Skip to content

Commit ef2174d

Browse files
committed
Pass through actual error classes
1 parent ce1d232 commit ef2174d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

spec/octocatalog-diff/integration/preserve_environments_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494

9595
it 'should exit with error status due modules in production environment not being found' do
9696
expect(@result.exitcode).to eq(-1), OctocatalogDiff::Integration.format_exception(@result)
97-
expect(@result.exception).to be_a_kind_of(OctocatalogDiff::Errors::CatalogError)
98-
expect(@result.exception.message).to match(/Errno::ENOENT: No such file or directory - Environment directory/)
97+
expect(@result.exception).to be_a_kind_of(Errno::ENOENT)
98+
expect(@result.exception.message).to match(/No such file or directory - Environment directory/)
9999
end
100100
end
101101

@@ -117,7 +117,7 @@
117117

118118
it 'should error on missing environment' do
119119
expect(@result.exitcode).to eq(-1), OctocatalogDiff::Integration.format_exception(@result)
120-
expect(@result.exception).to be_a_kind_of(OctocatalogDiff::Errors::CatalogError)
120+
expect(@result.exception).to be_a_kind_of(Errno::ENOENT)
121121
expect(@result.exception.message).to match(%r{Environment directory .+/environments/fluffy does not exist})
122122
end
123123
end
@@ -260,7 +260,7 @@
260260

261261
it 'should raise exception due to missing symlink request' do
262262
expect(@result.exitcode).to eq(-1), OctocatalogDiff::Integration.format_exception(@result)
263-
expect(@result.exception).to be_a_kind_of(OctocatalogDiff::Errors::CatalogError)
263+
expect(@result.exception).to be_a_kind_of(Errno::ENOENT)
264264
expect(@result.exception.message).to match(%r{Catalog for 'from' \(origin/master\) failed.+ Errno::ENOENT})
265265
expect(@result.exception.message).to match(%r{Specified directory .+/preserve-environments/fluffy doesn't exist})
266266
end

0 commit comments

Comments
 (0)