spec/unit/realtime/presence_spec.rb in ably-0.8.1 vs spec/unit/realtime/presence_spec.rb in ably-0.8.2

- old
+ new

@@ -11,15 +11,15 @@ describe 'callbacks' do specify 'are supported for valid STATE events' do state = nil subject.on(:initialized) { state = :entered } - expect { subject.trigger(:initialized) }.to change { state }.to(:entered) + expect { subject.emit(:initialized) }.to change { state }.to(:entered) end specify 'fail with unacceptable STATE event names' do expect { subject.on(:invalid) }.to raise_error KeyError - expect { subject.trigger(:invalid) }.to raise_error KeyError + expect { subject.emit(:invalid) }.to raise_error KeyError expect { subject.off(:invalid) }.to raise_error KeyError end end context 'msgbus', :api_private do