retry tests as a workaround for fragile integration tests (closes foodcoops#205)

This commit is contained in:
wvengen 2013-11-21 00:29:24 +01:00
parent 5adb25caf5
commit 8ac7cbf96f
3 changed files with 11 additions and 1 deletions

View file

@ -11,4 +11,6 @@ before_script:
- "mysql -e 'create database foodsoft_test;'" - "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' - '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' - '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

View file

@ -88,5 +88,6 @@ group :test do
# need to include rspec components before i18n-spec or rake fails in test environment # need to include rspec components before i18n-spec or rake fails in test environment
gem 'rspec-core' gem 'rspec-core'
gem 'rspec-expectations' gem 'rspec-expectations'
gem 'rspec-rerun'
gem 'i18n-spec' gem 'i18n-spec'
end end

View file

@ -249,6 +249,10 @@ GEM
redis-namespace (~> 1.2) redis-namespace (~> 1.2)
sinatra (>= 0.9.2) sinatra (>= 0.9.2)
vegas (~> 0.1.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-core (2.14.7)
rspec-expectations (2.14.4) rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
@ -260,6 +264,8 @@ GEM
rspec-core (~> 2.14.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0) rspec-mocks (~> 2.14.0)
rspec-rerun (0.1.3)
rspec (>= 2.11.0)
ruby-prof (0.13.0) ruby-prof (0.13.0)
ruby-rc4 (0.1.5) ruby-rc4 (0.1.5)
rubyzip (1.0.0) rubyzip (1.0.0)
@ -380,6 +386,7 @@ DEPENDENCIES
rspec-core rspec-core
rspec-expectations rspec-expectations
rspec-rails rspec-rails
rspec-rerun
ruby-prof ruby-prof
sass-rails (~> 3.2.3) sass-rails (~> 3.2.3)
select2-rails select2-rails