Sha256: 941f7fa2645f9d75da8f8f8731affb3732f0760028b39052de8b96fe75dfad00

Contents?: true

Size: 1.36 KB

Versions: 23

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", "--dev --debug")
  end
end

Version data entries

23 entries across 23 versions & 8 rubygems

Version Path
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/support/env.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/support/env.rb
tdiary-5.0.9 vendor/bundle/gems/simplecov-0.14.1/features/support/env.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/support/env.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/support/env.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/support/env.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/support/env.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/features/support/env.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/support/env.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/support/env.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/support/env.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/simplecov-0.14.1/features/support/env.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/simplecov-0.14.1/features/support/env.rb
simplecov-patched-0.14.3 features/support/env.rb
simplecov-patched-0.14.2 features/support/env.rb
simplecov-0.14.1 features/support/env.rb
simplecov-0.14.0 features/support/env.rb
simplecov-0.13.0 features/support/env.rb
abaci-0.3.0 vendor/bundle/gems/simplecov-0.12.0/features/support/env.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/simplecov-0.12.0/features/support/env.rb