Skip to content

Commit

Permalink
Automatically re-run failed specs.
Browse files Browse the repository at this point in the history
This change automatically re-run failed specs. The Paypal gateway has the
bad habit to return server errors at times. The result is a potential false
negative. Re-running the failed spec(s) gives the suite a chance to succeed.
  • Loading branch information
fredjean committed Oct 2, 2014
1 parent 911e02b commit 2f540c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ Gemfile.lock
tmp
pkg
spec/dummy
rspec.failures
.rvmrc
.idea
9 changes: 4 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require 'spree/testing_support/extension_rake'

desc 'Generates a dummy app for testing'
task :test_app do
Expand All @@ -14,18 +12,19 @@ end

require 'rspec/core'
require 'rspec/core/rake_task'
Rake::Task["spec"].clear
require 'rspec-rerun'
require 'spree/testing_support/extension_rake'

RSpec::Core::RakeTask.new(:spec) do |t|
t.fail_on_error = false
t.rspec_opts = %w[-f JUnit -o results.xml]
end

desc "Run RSpec with code coverage"
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task["spec"].execute
end
task :default => :spec
task :default => 'rspec-rerun:spec'


Bundler::GemHelper.install_tasks
1 change: 1 addition & 0 deletions spree_paypal_express.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'factory_girl', '~> 4.2'
s.add_development_dependency 'ffaker'
s.add_development_dependency 'rspec-rails', '~> 2.14.0'
s.add_development_dependency 'rspec-rerun'
s.add_development_dependency 'sass-rails', '~> 4.0.2'
s.add_development_dependency 'selenium-webdriver'
s.add_development_dependency 'simplecov'
Expand Down

0 comments on commit 2f540c3

Please sign in to comment.