summaryrefslogtreecommitdiff
path: root/features/support/rerun.rb
blob: 60b78f9d05079d92df9d6e652f76349bc15b4f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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
require 'spinach-rerun-reporter'

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