Class: Spec::Story::GivenScenario
- Inherits:
-
Object
- Object
- Spec::Story::GivenScenario
- Defined in:
- lib/spec/rails/story_adapter.rb,
lib/spec/story/given_scenario.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ GivenScenario
constructor
A new instance of GivenScenario.
- #perform(instance, ignore_name) ⇒ Object
Constructor Details
#initialize(name) ⇒ GivenScenario
Returns a new instance of GivenScenario.
4 5 6 |
# File 'lib/spec/story/given_scenario.rb', line 4 def initialize(name) @name = name end |
Instance Method Details
#perform(instance, ignore_name) ⇒ 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 |