Permalink
Browse files

Rspec Retry

Since we're dealing with intermittent failures and retrying code anyway, just retry the whole test if it fails once.


https://github.com/y310/rspec-retry
  • Loading branch information...
1 parent c2ff97a commit da77a640d1ad7346af968c3288e7f5c65a30fde7 @schneems schneems committed Jun 22, 2013
Showing with 14 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +8 −0 Gemfile.lock
  3. +5 −0 spec/spec_helper.rb
View
@@ -7,4 +7,5 @@ group :development, :test do
gem "excon"
gem "rake"
gem "parallel_tests"
+ gem 'rspec-retry'
end
View
@@ -30,9 +30,16 @@ GEM
rest-client (1.6.7)
mime-types (>= 1.16)
rrrretry (0.0.1)
+ rspec (2.2.0)
+ rspec-core (~> 2.2)
+ rspec-expectations (~> 2.2)
+ rspec-mocks (~> 2.2)
rspec-core (2.13.1)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
+ rspec-mocks (2.13.1)
+ rspec-retry (0.2.1)
+ rspec
thor (0.15.4)
PLATFORMS
@@ -45,3 +52,4 @@ DEPENDENCIES
rake
rspec-core
rspec-expectations
+ rspec-retry
View
@@ -2,14 +2,19 @@
require 'hatchet'
require 'fileutils'
require 'hatchet'
+require 'rspec/retry'
ENV['RACK_ENV'] = 'test'
+
+
RSpec.configure do |config|
config.filter_run :focused => true
config.run_all_when_everything_filtered = true
config.alias_example_to :fit, :focused => true
config.full_backtrace = true
+ config.verbose_retry = true # show retry status in spec process
+ config.default_retry_count = 2 # retry all tests that fail again
config.expect_with :rspec do |c|
c.syntax = :expect

0 comments on commit da77a64

Please sign in to comment.