free_mutant/spec/unit/mutant/actor/message_spec.rb
2018-09-12 13:15:43 +00:00

25 lines
593 B
Ruby

# frozen_string_literal: true
RSpec.describe Mutant::Actor::Message do
let(:type) { instance_double(Symbol) }
let(:payload) { instance_double(Object) }
describe '.new' do
subject { described_class.new(*arguments) }
context 'with one argument' do
let(:arguments) { [type] }
its(:type) { should be(type) }
its(:payload) { should be(Mutant::Actor::Undefined) }
end
context 'with two arguments' do
let(:arguments) { [type, payload] }
its(:type) { should be(type) }
its(:payload) { should be(payload) }
end
end
end