Sha256: de4695b6045e42de4bf26eec78add54120a6e5fafaad6cfa6c9518194fdd963e
Contents?: true
Size: 857 Bytes
Versions: 8
Compression:
Stored size: 857 Bytes
Contents
# frozen_string_literal: true 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
8 entries across 8 versions & 1 rubygems