Sha256: 88ca88e04c62c5991cf2137a47d66286d2dd359f1571cfe9053e4afe396553eb

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 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 "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

Capybara.configure do |config|
  config.ignore_hidden_elements = false
end

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_directory do
    FileUtils.rm_rf "project"
    FileUtils.cp_r File.join(this_dir, "../../spec/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

13 entries across 13 versions & 3 rubygems

Version Path
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.2 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.1 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/features/support/env.rb
simplecov-0.11.2 features/support/env.rb
simplecov-0.11.1 features/support/env.rb
simplecov-0.11.0 features/support/env.rb