@@ -127,10 +127,12 @@ def self.catalog_contains_resource(result, type, title)
127127 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
128128 end
129129
130+ # rubocop:disable Metrics/LineLength
130131 it 'should have formatted error messages' do
131132 msg = @result . exception . message
132- expect ( msg ) . to eq ( 'Catalog has broken reference: exec[before caller] -> before[Exec[before target]]' )
133+ expect ( msg ) . to eq ( 'Catalog has broken reference: exec[before caller](/environments/production/modules/test/manifests/before_callers.pp:2) -> before[Exec[before target]]' )
133134 end
135+ # rubocop:enable Metrics/LineLength
134136 end
135137
136138 context 'with broken notify' do
@@ -146,10 +148,12 @@ def self.catalog_contains_resource(result, type, title)
146148 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
147149 end
148150
151+ # rubocop:disable Metrics/LineLength
149152 it 'should have formatted error messages' do
150153 msg = @result . exception . message
151- expect ( msg ) . to match ( / exec\[ notify caller\] -> notify\[ Test::Foo::Bar\[ notify target\] \] / )
154+ expect ( msg ) . to match ( %r{ exec\[ notify caller\] \( /environments/production/modules/test/manifests/notify_callers.pp:2 \) -> notify\[ Test::Foo::Bar\[ notify target\] \] } )
152155 end
156+ # rubocop:enable Metrics/LineLength
153157 end
154158
155159 context 'with broken require' do
@@ -165,14 +169,16 @@ def self.catalog_contains_resource(result, type, title)
165169 expect ( @result . exception ) . to be_a_kind_of ( OctocatalogDiff ::Errors ::ReferenceValidationError )
166170 end
167171
172+ # rubocop:disable Metrics/LineLength
168173 it 'should have formatted error messages' do
169174 msg = @result . exception . message
170- expect ( msg ) . to match ( / exec\[ require caller\] -> require\[ Exec\[ require target\] \] / )
171- expect ( msg ) . to match ( / exec\[ require caller 3\] -> require\[ Exec\[ require target\] \] / )
172- expect ( msg ) . to match ( / exec\[ require caller 4\] -> require\[ Exec\[ require target\] \] / )
175+ expect ( msg ) . to match ( %r{ exec\[ require caller\] \( /environments/production/modules/test/manifests/require_callers.pp:2 \) -> require\[ Exec\[ require target\] \] } )
176+ expect ( msg ) . to match ( %r{ exec\[ require caller 3\] \( /environments/production/modules/test/manifests/require_callers.pp:12 \) -> require\[ Exec\[ require target\] \] } )
177+ expect ( msg ) . to match ( %r{ exec\[ require caller 4\] \( /environments/production/modules/test/manifests/require_callers.pp:12 \) -> require\[ Exec\[ require target\] \] } )
173178 expect ( msg ) . not_to match ( /exec\[ require caller 2\] / )
174179 expect ( msg ) . not_to match ( /-> require\[ Exec\[ require caller\] \] / )
175180 end
181+ # rubocop:enable Metrics/LineLength
176182 end
177183
178184 context 'with broken subscribe but subscribe not checked' do
0 commit comments