upgrade to cucumber 2.0
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#monkey patch cucumber table class to reorder output.
|
||||
#we always want failed rows to be shown right below the expected row.
|
||||
|
||||
class Cucumber::Ast::Table
|
||||
def routing_diff!(other_table, options={})
|
||||
class Cucumber::MultilineArgument::DataTable
|
||||
def diff!(other_table, options={})
|
||||
options = {:missing_row => true, :surplus_row => true, :missing_col => true, :surplus_col => false}.merge(options)
|
||||
|
||||
other_table = ensure_table(other_table)
|
||||
|
||||
@@ -4,22 +4,16 @@ STRESS_TIMEOUT = 300
|
||||
|
||||
Before do |scenario|
|
||||
|
||||
# feature name
|
||||
# fetch scenario and feature name, so we can use it in log files if needed
|
||||
case scenario
|
||||
when Cucumber::Ast::Scenario
|
||||
when Cucumber::RunningTestCase::Scenario
|
||||
@feature_name = scenario.feature.name
|
||||
when Cucumber::Ast::OutlineTable::ExampleRow
|
||||
@feature_name = scenario.scenario_outline.feature.name
|
||||
end
|
||||
|
||||
# scenario name
|
||||
case scenario
|
||||
when Cucumber::Ast::Scenario
|
||||
@scenario_title = scenario.name
|
||||
when Cucumber::Ast::OutlineTable::ExampleRow
|
||||
when Cucumber::RunningTestCase::ExampleRow
|
||||
@feature_name = scenario.scenario_outline.feature.name
|
||||
@scenario_title = scenario.scenario_outline.name
|
||||
end
|
||||
|
||||
|
||||
@load_method = DEFAULT_LOAD_METHOD
|
||||
@query_params = {}
|
||||
@scenario_time = Time.now.strftime("%Y-%m-%dT%H:%m:%SZ")
|
||||
|
||||
Reference in New Issue
Block a user