free_mutant/spec/unit/mutant/isolation/none_spec.rb
2018-09-12 13:15:43 +00:00

18 lines
393 B
Ruby

# frozen_string_literal: true
RSpec.describe Mutant::Isolation::None do
describe '.call' do
let(:object) { described_class.new }
it 'return block value' do
expect(object.call { :foo }).to be(:foo)
end
it 'wraps *all* exceptions' do
expect { object.call { fail 'foo' } }.to raise_error(
Mutant::Isolation::Error,
'foo'
)
end
end
end