Module: Spec::Story::Runner
- Defined in:
- lib/spec/story/runner.rb,
lib/spec/story/runner/story_parser.rb,
lib/spec/story/runner/story_runner.rb,
lib/spec/story/runner/story_mediator.rb,
lib/spec/story/runner/scenario_runner.rb,
lib/spec/story/runner/scenario_collector.rb,
lib/spec/story/runner/plain_text_story_runner.rb
Defined Under Namespace
Classes: IllegalStepError, PlainTextStoryRunner, ScenarioCollector, ScenarioRunner, StoryMediator, StoryParser, StoryRunner
Class Method Summary collapse
- .create_story_runner ⇒ Object
- .dry_run ⇒ Object
-
.register_exit_hook ⇒ Object
:nodoc:.
-
.register_listener(listener) ⇒ Object
Use this to register a customer output formatter.
-
.run_options ⇒ Object
:nodoc:.
-
.scenario_runner ⇒ Object
:nodoc:.
-
.story_runner ⇒ Object
:nodoc:.
-
.world_creator ⇒ Object
:nodoc:.
Class Method Details
.create_story_runner ⇒ Object
34 35 36 |
# File 'lib/spec/story/runner.rb', line 34 def self.create_story_runner Runner::StoryRunner.new(scenario_runner, world_creator) end |
.dry_run ⇒ Object
51 52 53 |
# File 'lib/spec/story/runner.rb', line 51 def self.dry_run .dry_run end |
.register_exit_hook ⇒ Object
:nodoc:
45 46 47 48 49 |
# File 'lib/spec/story/runner.rb', line 45 def self.register_exit_hook # :nodoc: at_exit do exit Runner.story_runner.run_stories unless $! end end |
.register_listener(listener) ⇒ Object
Use this to register a customer output formatter.
39 40 41 42 43 |
# File 'lib/spec/story/runner.rb', line 39 def self.register_listener(listener) story_runner.add_listener(listener) # run_started, story_started, story_ended, #run_ended world_creator.add_listener(listener) # found_scenario, step_succeeded, step_failed, step_failed scenario_runner.add_listener(listener) # scenario_started, scenario_succeeded, scenario_pending, scenario_failed end |
.run_options ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/spec/story/runner.rb', line 11 def self. # :nodoc: Spec::Runner. end |
.scenario_runner ⇒ Object
:nodoc:
26 27 28 |
# File 'lib/spec/story/runner.rb', line 26 def self.scenario_runner # :nodoc: @scenario_runner ||= ScenarioRunner.new end |
.story_runner ⇒ Object
:nodoc:
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/spec/story/runner.rb', line 15 def self.story_runner # :nodoc: unless @story_runner @story_runner = create_story_runner .story_formatters.each do |formatter| register_listener(formatter) end self.register_exit_hook end @story_runner end |
.world_creator ⇒ Object
:nodoc:
30 31 32 |
# File 'lib/spec/story/runner.rb', line 30 def self.world_creator # :nodoc: @world_creator ||= World end |