lib/submodules/ably-ruby/spec/acceptance/realtime/client_spec.rb in ably-rest-1.1.0 vs lib/submodules/ably-ruby/spec/acceptance/realtime/client_spec.rb in ably-rest-1.1.2.rc1

- old
+ new

@@ -313,12 +313,13 @@ sub_channel.subscribe do |msg| expect(msg.name).to eql(event_name) expect(msg.data).to eql(data) stop_reactor end + + subject.publish channel_name, event_name, data end - subject.publish channel_name, event_name, data end specify 'publishing does not result in a channel being created' do subject.publish channel_name, event_name, data subject.channels.fetch(channel_name) do @@ -339,34 +340,37 @@ sub_channel.attach do sub_channel.subscribe do |msg| expect(msg.extras).to eql(extras) stop_reactor end + + subject.publish channel_name, event_name, {}, extras: extras end - subject.publish channel_name, event_name, {}, extras: extras end end specify 'publishing supports an array of Message objects' do sub_channel.attach do sub_channel.subscribe do |msg| expect(msg.name).to eql(event_name) expect(msg.data).to eql(data) stop_reactor end + + subject.publish channel_name, [message] end - subject.publish channel_name, [message] end specify 'publishing supports an array of Hash objects' do sub_channel.attach do sub_channel.subscribe do |msg| expect(msg.name).to eql(event_name) expect(msg.data).to eql(data) stop_reactor end + + subject.publish channel_name, [name: event_name, data: data] end - subject.publish channel_name, [name: event_name, data: data] end specify 'publishing on a closed connection fails' do subject.connection.once(:connected) do subject.connection.once(:closed) do