Add specification for isolation exception wrapping

This commit is contained in:
Markus Schirp 2014-07-06 03:12:44 +00:00
parent ea14f772f4
commit d827dc4543

View file

@ -17,6 +17,10 @@ describe Mutant::Isolation::None do
expect(object.call { :foo }).to be(:foo)
end
it 'wraps *all* exceptions' do
expect { object.call { fail } }.to raise_error(Mutant::Isolation::Error)
end
end
end
@ -37,5 +41,9 @@ describe Mutant::Isolation::Fork do
expect(object.call { :foo }).to be(:foo)
end
it 'wraps Parallel::DeadWorker exceptions' do
expect { object.call { fail Parallel::DeadWorker } }.to raise_error(Mutant::Isolation::Error)
end
end
end