Sha256: 656138e18a85a6e0973a452aa07a8e7a4c44594ebc1c5e09f643de55cec7dc75

Contents?: true

Size: 548 Bytes

Versions: 8

Compression:

Stored size: 548 Bytes

Contents

module StartingBlocks
  class Runner

    include Displayable

    def initialize options
      @verbose = options[:verbose]
    end

    def run_files specs
      display "Specs to run: #{specs.inspect}"
      StartingBlocks::Publisher.publish_specs_to_run specs
      results = execute_these_specs specs
      StartingBlocks::Publisher.publish_results results
      puts results
    end

    private

    def execute_these_specs specs
      requires = specs.map { |x| "require '#{x}'" }.join("\n")
      `ruby -e "#{requires}"`
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
starting_blocks-0.0.18 lib/starting_blocks/runner.rb
starting_blocks-0.0.17 lib/starting_blocks/runner.rb
starting_blocks-0.0.16 lib/starting_blocks/runner.rb
starting_blocks-0.0.15 lib/starting_blocks/runner.rb
starting_blocks-0.0.14 lib/starting_blocks/runner.rb
starting_blocks-0.0.13 lib/starting_blocks/runner.rb
starting_blocks-0.0.12 lib/starting_blocks/runner.rb
starting_blocks-0.0.11 lib/starting_blocks/runner.rb