From 8ac7cbf96fcfda9ebbb9e797136d398bb7926a80 Mon Sep 17 00:00:00 2001 From: wvengen Date: Thu, 21 Nov 2013 00:29:24 +0100 Subject: [PATCH] retry tests as a workaround for fragile integration tests (closes foodcoops#205) --- .travis.yml | 4 +++- Gemfile | 1 + Gemfile.lock | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3e24f134..383dac1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,6 @@ before_script: - "mysql -e 'create database foodsoft_test;'" - 'printf "test:\n adapter: mysql2\n database: foodsoft_test\n username: travis\n encoding: utf8\n" >config/database.yml' - 'bundle exec rake db:schema:load RAILS_ENV=test' -script: bundle exec rake spec + # add format to get output with rspec-rerun https://github.com/dblock/rspec-rerun/issues/2 + - 'echo "--color --format progress" >.rspec' +script: bundle exec rake rspec-rerun:spec diff --git a/Gemfile b/Gemfile index c04e5041..ffb4ff0e 100644 --- a/Gemfile +++ b/Gemfile @@ -88,5 +88,6 @@ group :test do # need to include rspec components before i18n-spec or rake fails in test environment gem 'rspec-core' gem 'rspec-expectations' + gem 'rspec-rerun' gem 'i18n-spec' end diff --git a/Gemfile.lock b/Gemfile.lock index 8e3a6be3..5f72b63f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -249,6 +249,10 @@ GEM redis-namespace (~> 1.2) sinatra (>= 0.9.2) vegas (~> 0.1.2) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) rspec-core (2.14.7) rspec-expectations (2.14.4) diff-lcs (>= 1.1.3, < 2.0) @@ -260,6 +264,8 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) + rspec-rerun (0.1.3) + rspec (>= 2.11.0) ruby-prof (0.13.0) ruby-rc4 (0.1.5) rubyzip (1.0.0) @@ -380,6 +386,7 @@ DEPENDENCIES rspec-core rspec-expectations rspec-rails + rspec-rerun ruby-prof sass-rails (~> 3.2.3) select2-rails