spec/rspec_config.rb in ably-0.6.2 vs spec/rspec_config.rb in ably-0.7.0

- old
+ new

@@ -25,15 +25,24 @@ config.before(:example) do WebMock.disable! end - config.before(:example, :webmock => true) do + config.before(:example, :webmock) do allow(TestApp).to receive(:instance).and_return(instance_double('TestApp', app_id: 'app_id', key_id: 'app_id.key_id', api_key: 'app_id.key_id:secret', environment: 'sandbox' )) WebMock.enable! end + + if defined?(EventMachine) + config.before(:example) do + # Ensure EventMachine shutdown hooks are deregistered for every test + EventMachine.instance_variable_set '@tails', [] + end + end + + config.add_formatter Ably::RSpec::PrivateApiFormatter end