diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-09 14:12:08 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-09 14:22:32 +0100 |
commit | af43401602d637c5b91def323ba3a0bac824b785 (patch) | |
tree | 88061d7009e36bbc93e3db84a526e3191260bbc0 /features/support | |
parent | 640bf8ab7212988fda0189e1534d46dcbf0c126f (diff) | |
download | gitlab-ce-af43401602d637c5b91def323ba3a0bac824b785.tar.gz |
Retry spinach tests
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/env.rb | 1 | ||||
-rw-r--r-- | features/support/rerun.rb | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 62c80b9c948..357d164d87f 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -14,6 +14,7 @@ require 'sidekiq/testing/inline' require_relative 'capybara' require_relative 'db_cleaner' +require_relative 'rerun' %w(select2_helper test_env repo_helpers).each do |f| require Rails.root.join('spec', 'support', f) diff --git a/features/support/rerun.rb b/features/support/rerun.rb new file mode 100644 index 00000000000..8b176c5be89 --- /dev/null +++ b/features/support/rerun.rb @@ -0,0 +1,14 @@ +# The spinach-rerun-reporter doesn't define the on_undefined_step +# See it here: https://github.com/javierav/spinach-rerun-reporter/blob/master/lib/spinach/reporter/rerun.rb +module Spinach + class Reporter + class Rerun + def on_undefined_step(step_data, failure, step_definitions = nil) + super step_data, failure, step_definitions + + # save feature file and scenario line + @rerun << "#{current_feature.filename}:#{current_scenario.line}" + end + end + end +end |