spec/acceptance/rest/presence_spec.rb in ably-0.7.0 vs spec/acceptance/rest/presence_spec.rb in ably-0.7.1

- old
+ new

@@ -16,17 +16,17 @@ IdiomaticRubyWrapper(fixture, stop_at: [:data]) end end context 'tested against presence fixture data set up in test app' do - before(:context) do - # When this test is run as a part of a test suite, the presence data injected in the test app may have expired - WebMock.disable! - TestApp.reload - end - describe '#get' do + before(:context) do + # When this test is run as a part of a test suite, the presence data injected in the test app may have expired + WebMock.disable! + TestApp.reload + end + let(:channel) { client.channel('persisted:presence_fixtures') } let(:presence) { channel.presence.get } it 'returns current members on the channel with their action set to :present' do expect(presence.size).to eql(4) @@ -50,9 +50,15 @@ end end end describe '#history' do + before(:context) do + # When this test is run as a part of a test suite, the presence data injected in the test app may have expired + WebMock.disable! + TestApp.reload + end + let(:channel) { client.channel('persisted:presence_fixtures') } let(:presence_history) { channel.presence.history } it 'returns recent presence activity' do expect(presence_history.size).to eql(4)