spec/unit/models/protocol_message_spec.rb in ably-0.8.8 vs spec/unit/models/protocol_message_spec.rb in ably-0.8.9
- old
+ new
@@ -18,20 +18,20 @@
end
context 'initializer action coercion', :api_private do
it 'ignores actions that are Integers' do
protocol_message = subject.new(action: 14)
- expect(protocol_message.hash[:action]).to eql(14)
+ expect(protocol_message.attributes[:action]).to eql(14)
end
it 'converts actions to Integers if a symbol' do
protocol_message = subject.new(action: :message)
- expect(protocol_message.hash[:action]).to eql(15)
+ expect(protocol_message.attributes[:action]).to eql(15)
end
it 'converts actions to Integers if a ACTION' do
protocol_message = subject.new(action: Ably::Models::ProtocolMessage::ACTION.Message)
- expect(protocol_message.hash[:action]).to eql(15)
+ expect(protocol_message.attributes[:action]).to eql(15)
end
it 'raises an argument error if nil' do
expect { subject.new({}) }.to raise_error(ArgumentError)
end