Sha256: 46cfd76a8e007fa423dfa138470a855cfec030104ec24fe7747a4503eed76c25

Contents?: true

Size: 833 Bytes

Versions: 3

Compression:

Stored size: 833 Bytes

Contents

require 'ospec/runner/options'
require 'ospec/runner/reporter'
require 'ospec/runner/example_group_runner'

require 'ospec/runner/formatter/html_formatter'
require 'ospec/runner/formatter/terminal_formatter'

module Spec
  module Runner
  
    def self.run
      options.run_examples
    end
  
    def self.options
      @options ||= Options.new
      @options
    end
    
    def self.autorun
      if ARGV.length == 0
        puts "Spec: no input files given"
        return
      end

      ARGV.each do |spec|
        # puts "should try and load #{spec}"
        if File.exists? spec
          # puts "loading: " + File.expand_path(spec)
          require File.expand_path(spec)
        else
          raise "Bad spec to load (does not exist): #{spec}"
        end
      end

      Spec::Runner.run
    end

  end # Runner
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-0.3.2 gems/ospec/lib/ospec/runner.rb
opal-0.3.1 gems/ospec/lib/ospec/runner.rb
opal-0.3.0 gems/ospec/lib/ospec/runner.rb