free_mutant/spec/unit/mutant/parallel_spec.rb

17 lines
620 B
Ruby
Raw Normal View History

2014-12-08 19:10:31 -05:00
RSpec.describe Mutant::Parallel do
describe '.async' do
subject { described_class.async(config) }
let(:config) { instance_double(Mutant::Parallel::Config, env: env) }
let(:env) { instance_double(Mutant::Actor::Env, new_mailbox: mailbox) }
let(:mailbox) { Mutant::Actor::Mailbox.new }
let(:master) { instance_double(Mutant::Parallel::Master) }
2014-12-08 19:10:31 -05:00
before do
expect(described_class::Master).to receive(:call).with(config).and_return(master)
end
it { should eql(described_class::Driver.new(mailbox.bind(master))) }
end
end