Sha256: 9abde9834e97db5021e2ea8ba008454fd50193c4b63b885c437fec6a83dd7edd
Contents?: true
Size: 826 Bytes
Versions: 5
Compression:
Stored size: 826 Bytes
Contents
RSpec.describe Mutant::Actor::Mailbox do let(:mutex) { instance_double(Mutex) } let(:condition_variable) { instance_double(ConditionVariable) } before do allow(Mutex).to receive(:new).and_return(mutex) allow(ConditionVariable).to receive(:new).and_return(condition_variable) end describe '.new' do subject { described_class.new } its(:sender) { should eql(Mutant::Actor::Sender.new(condition_variable, mutex, [])) } its(:receiver) { should eql(Mutant::Actor::Receiver.new(condition_variable, mutex, [])) } end describe '#bind' do let(:object) { described_class.new } let(:other) { instance_double(Mutant::Actor::Sender) } subject { object.bind(other) } it { should eql(Mutant::Actor::Binding.new(object, other)) } end end
Version data entries
5 entries across 5 versions & 1 rubygems