free_mutant/spec/unit/mutant/isolation_spec.rb
Markus Schirp 8fd9743742 Use parallel gem for isolation and signalling
The code looks solid and it does not make too much sense to duplicate
the efford into a better version when I would mostly change the code
style, not the effective sequence / composition of syscalls.
2014-06-25 00:14:16 +00:00

16 lines
358 B
Ruby

require 'spec_helper'
describe Mutant::Isolation do
describe '.run' do
let(:object) { described_class }
it 'isolates global effects from process' do
expect { object.call { $global = 1 } }.not_to change { defined?($global) }.from(nil)
end
it 'return block value' do
expect(object.call { :foo }).to be(:foo)
end
end
end