Sha256: 5a1bd2263b8a3351e71dcfda0286db0bfb370cc742d7edd43761a61390401599

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

if RUBY_VERSION < "1.9"
  $stderr.puts "Sorry, Cucumber features are only meant to run on Ruby 1.9+ :("
  exit 0
end

require "bundler"
Bundler.setup
require "aruba/cucumber"
require "aruba/jruby" if RUBY_ENGINE == "jruby"
require "capybara/cucumber"
require "minitest/autorun"
require "phantomjs/poltergeist"

# Fake rack app for capybara that just returns the latest coverage report from aruba temp project dir
Capybara.app = lambda { |env|
  request_path = env["REQUEST_PATH"] || "/"
  request_path = "/index.html" if request_path == "/"
  [
    200,
    {"Content-Type" => "text/html"},
    [File.read(File.join(File.dirname(__FILE__), "../../tmp/aruba/project/coverage", request_path))],
  ]
}

Capybara.default_driver = Capybara.javascript_driver = :poltergeist

Before do
  # JRuby takes it's time... See https://github.com/cucumber/aruba/issues/134
  @aruba_timeout_seconds = RUBY_ENGINE == "jruby" ? 60 : 20

  this_dir = File.dirname(__FILE__)

  # Clean up and create blank state for fake project
  in_current_dir do
    FileUtils.rm_rf "project"
    FileUtils.cp_r File.join(this_dir, "../../test/faked_project/"), "project"
  end

  step 'I cd to "project"'
end

# Workaround for https://github.com/cucumber/aruba/pull/125
Aruba.configure do |config|
  config.before_cmd do
    set_env("JRUBY_OPTS", "-X-C --1.9")
  end
end

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/features/support/env.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/features/support/env.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/features/support/env.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/features/support/env.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/features/support/env.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/features/support/env.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/simplecov-0.10.0/features/support/env.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/simplecov-0.10.0/features/support/env.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/simplecov-0.10.0/features/support/env.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/simplecov-0.10.0/features/support/env.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/simplecov-0.10.0/features/support/env.rb
simplecov-0.10.0 features/support/env.rb