Class: Spec::Story::GivenScenario

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/rails/story_adapter.rb

Instance Method Summary collapse

Instance Method Details

#perform(instance, name = nil) ⇒ Object



73
74
75
76
77
78
# File 'lib/spec/rails/story_adapter.rb', line 73

def perform(instance, name = nil)
  scenario = Spec::Story::Runner::StoryRunner.scenario_from_current_story @name
  runner = Spec::Story::Runner::ScenarioRunner.new
  runner.instance_variable_set(:@listeners,[])
  runner.run(scenario, instance)
end