Sha256: 4ae27130a0d9042a2f1465e67f36cc8f7005ab896236639c18af04a7004e5b27
Contents?: true
Size: 833 Bytes
Versions: 17
Compression:
Stored size: 833 Bytes
Contents
RSpec.describe Mutant::Actor::Mailbox do let(:mutex) { double('Mutex') } let(:condition_variable) { double('Mutex') } 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 } let(:object) { described_class.new } let(:thread) { double('Thread') } 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) { double('Sender') } subject { object.bind(other) } it { should eql(Mutant::Actor::Binding.new(object, other)) } end end
Version data entries
17 entries across 17 versions & 1 rubygems