Sha256: 71d4df25f20c1b2c5af3ac91e09cfa61995b73e2e23234d3055919ef21c8c02d

Contents?: true

Size: 677 Bytes

Versions: 4

Compression:

Stored size: 677 Bytes

Contents

#
# Bolt::Runner
#
# The Runner maps the changed file to the appropriate test file and runs it
#
module Bolt
  class Runner
    attr_accessor :selected, :notifier
    
    # Constructor
    def initialize 
      # find appropriate listener
      $stdout.puts "** Using #{runner.class}... \n"
    end
    
    # Pick a listener to launch
    def runner
      return selected if selected
      # TODO: os identification via RUBY_PLATFORM is flawed as it will return 'java' in jruby. Look for a different solution
      
      self.selected= Bolt::Runners::TestUnit.new
      self.selected= Bolt::Runners::RSpec.new if File.directory?('spec')
      selected
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
marcinbunsch-bolt-0.1.0 lib/bolt/runner.rb
marcinbunsch-bolt-0.1.4 lib/bolt/runner.rb
marcinbunsch-bolt-0.1.6 lib/bolt/runner.rb
marcinbunsch-bolt-0.1.7 lib/bolt/runner.rb