Flowdock
method

run_stories

Importance_0
1.1.4 - Show latest stable - 0 notes - Class: Spec::Story::Runner::StoryRunner
run_stories() public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/story/runner/story_runner.rb, line 36
        def run_stories
          return if @stories.empty?
          @listeners.each { |l| l.run_started(scenarios.size) }
          success = true
          @stories.each do |story|
            story.assign_steps_to(World)
            @current_story = story
            @listeners.each { |l| l.story_started(story.title, story.narrative) }
            scenarios = @scenarios_by_story[story.title]
            scenarios.each do |scenario|
              type = story[:type] || Object
              args = story[:args] || []
              world = @world_creator.create(type, *args)
              success = success & @scenario_runner.run(scenario, world)
            end
            @listeners.each { |l| l.story_ended(story.title, story.narrative) }
            World.step_mother.clear
          end
          unique_steps = (World.step_names.collect {|n| Regexp === n ? n.source : n.to_s}).uniq.sort
          @listeners.each { |l| l.collected_steps(unique_steps) }
          @listeners.each { |l| l.run_ended }
          return success
        end
Register or log in to add new notes.