Sha256: 35867f9f040d05ff360a45c91ce25accdeaaaeb48419886c8d909ae8c4c9e18f

Contents?: true

Size: 861 Bytes

Versions: 25

Compression:

Stored size: 861 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "/helpers/ruby_env"))

class Rspec2Adapter

  def self.command(project_path, ruby_interpreter, files)
    spec_command = RubyEnv.ruby_command(project_path,
      :bin => "rspec",
      :ruby_interpreter => ruby_interpreter)

    if File.exists?("#{project_path}/spec/spec.opts")
      spec_command += " -O spec/spec.opts"
    end

    "export RSPEC_COLOR=true; #{spec_command} #{files}"
  end

  def self.test_files(dir)
    Dir["#{dir}/#{file_pattern}"]
  end

  def self.get_sizes(files)
    files.map { |file| File.stat(file).size }
  end

  def self.requester_port
    2299
  end

  def self.pluralized
    'specs'
  end

  def self.base_path
    "spec"
  end

  def self.name
    'RSpec2'
  end

  def self.type
    'rspec'
  end

private

  def self.file_pattern
    '**/**/*_spec.rb'
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
testbot-0.7.12 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.11 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.9 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.8 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.7 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.6 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.5 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.3 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.2 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.1 lib/shared/adapters/rspec2_adapter.rb
testbot-0.7.0 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.9 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.8 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.7 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.6 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.5 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.4 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.3 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.2 lib/shared/adapters/rspec2_adapter.rb
testbot-0.6.1 lib/shared/adapters/rspec2_adapter.rb