Sha256: 55443c0c988b18e197ccb9a89eff7f63359957d490bc6bd0a9ab3fac4593ff28

Contents?: true

Size: 562 Bytes

Versions: 8

Compression:

Stored size: 562 Bytes

Contents

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.16 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.15 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.14 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.13 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.12 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.11 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.10 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.9 spec/unit/mutant/actor/message_spec.rb