Sha256: 0ae17b61f56c10004d6968ef375f3d1c227c24e2a551c7bb7c584deb1c805238

Contents?: true

Size: 593 Bytes

Versions: 8

Compression:

Stored size: 593 Bytes

Contents

# 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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.24 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.23 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.22 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.21 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.20 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.19 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.18 spec/unit/mutant/actor/message_spec.rb
mutant-0.8.17 spec/unit/mutant/actor/message_spec.rb