spec/rspec_config.rb in ably-0.7.0 vs spec/rspec_config.rb in ably-0.7.1
- old
+ new
@@ -3,10 +3,12 @@
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+require 'rspec/retry'
+
RSpec.configure do |config|
config.run_all_when_everything_filtered = true
config.filter_run :focus
config.mock_with :rspec do |mocks|
@@ -43,6 +45,13 @@
EventMachine.instance_variable_set '@tails', []
end
end
config.add_formatter Ably::RSpec::PrivateApiFormatter
+
+ if ENV['RSPEC_RETRY']
+ puts 'Running tests using RSpec retry'
+ config.verbose_retry = true # show retry status in spec process
+ config.default_retry_count = 3
+ config.default_sleep_interval = 2
+ end
end