@@ -126,7 +126,7 @@ def self.catalog_contains_resource(result, type, title)
126126 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
127127 end
128128
129- if OctocatalogDiff ::Spec . is_puppet5?
129+ if OctocatalogDiff ::Spec . major_version >= 5
130130 it 'should pass through the error messages from Puppet' do
131131 msg = @result . exception . message
132132 expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ subscribe target\] ' in parameter 'subscribe'/ )
@@ -159,7 +159,7 @@ def self.catalog_contains_resource(result, type, title)
159159 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
160160 end
161161
162- if OctocatalogDiff ::Spec . is_puppet5?
162+ if OctocatalogDiff ::Spec . major_version >= 5
163163 it 'should pass through the error messages from Puppet' do
164164 msg = @result . exception . message
165165 expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ before target\] ' in parameter 'before'/ )
@@ -187,7 +187,7 @@ def self.catalog_contains_resource(result, type, title)
187187 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
188188 end
189189
190- if OctocatalogDiff ::Spec . is_puppet5?
190+ if OctocatalogDiff ::Spec . major_version >= 5
191191 it 'should pass through the error messages from Puppet' do
192192 msg = @result . exception . message
193193 expect ( msg ) . to match ( /Error: Could not find resource 'Test::Foo::Bar\[ notify target\] ' in parameter 'notify'/ )
@@ -215,7 +215,7 @@ def self.catalog_contains_resource(result, type, title)
215215 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
216216 end
217217
218- if OctocatalogDiff ::Spec . is_puppet5?
218+ if OctocatalogDiff ::Spec . major_version >= 5
219219 it 'should pass through the error messages from Puppet' do
220220 msg = @result . exception . message
221221 expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ require target\] ' in parameter 'require'/ )
@@ -239,7 +239,7 @@ def self.catalog_contains_resource(result, type, title)
239239 @result = OctocatalogDiff ::Spec . reference_validation_catalog ( 'broken-subscribe' , %w( before notify require ) )
240240 end
241241
242- if OctocatalogDiff ::Spec . is_puppet5?
242+ if OctocatalogDiff ::Spec . major_version >= 5
243243 it 'should raise CatalogError' do
244244 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
245245 end
@@ -295,7 +295,7 @@ def self.catalog_contains_resource(result, type, title)
295295 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::CatalogError )
296296 end
297297
298- if OctocatalogDiff ::Spec . is_puppet5?
298+ if OctocatalogDiff ::Spec . major_version >= 5
299299 it 'should pass through the error messages from Puppet' do
300300 msg = @result . exception . message
301301 expect ( msg ) . to match ( /Error: Could not find resource 'Exec\[ before alias target\] ' in parameter 'before'/ )
0 commit comments