Fixed scenariodisabler to create an empty step_collection instead of relying

on an already-initialized step collection and emptying it
pull/182/head
Sebastian Schuster 12 years ago
parent 536abbcaae
commit 435c566257
  1. 3
      lib/scenario_disabler.rb

@ -12,8 +12,7 @@
class ScenarioDisabler
def self.empty_if_disabled(scenario)
if self.disabled?(scenario)
step_collection = scenario.instance_variable_get(:@steps)
step_collection.instance_variable_set(:@steps, [])
scenario.instance_variable_set(:@steps,::Cucumber::Ast::StepCollection.new([]))
true
else

Loading…
Cancel
Save