Sha256: 879f34a91e6f177997eef96549219c565da64c92192dc1d1cb0f1ce1575bea20

Contents?: true

Size: 1.21 KB

Versions: 16

Compression:

Stored size: 1.21 KB

Contents

$LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__)

# Has to be the first file required so that all other files show coverage information
require 'simplecov'

# Standard Library
require 'fileutils'
require 'pathname'

# Gems
require 'aruba/cucumber'
require 'rspec/expectations'

Before do |scenario|
  command_name = if scenario.respond_to?(:feature) && scenario.respond_to?(:name)
                   "#{scenario.feature.name} #{scenario.name}"
                 else
                   raise TypeError.new("Don't know how to extract command name from #{scenario.class}")
                 end

  # Used in simplecov_setup so that each scenario has a different name and their coverage results are merged instead
  # of overwriting each other as 'Cucumber Features'
  ENV['SIMPLECOV_COMMAND_NAME'] = command_name.to_s

  simplecov_setup_pathname = Pathname.new(__FILE__).expand_path.parent.join('simplecov_setup')

  # set environment variable so child processes will merge their coverage data with parent process's coverage data.
  if RUBY_VERSION < '1.9'
    ENV['RUBYOPT'] = "-r rubygems -r#{simplecov_setup_pathname} #{ENV['RUBYOPT']}"
  else
    ENV['RUBYOPT'] = "-r#{simplecov_setup_pathname} #{ENV['RUBYOPT']}"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
aruba-0.13.0 features/support/env.rb
aruba-0.12.0 features/support/env.rb
aruba-0.11.2 features/support/env.rb
aruba-0.11.1 features/support/env.rb
aruba-0.11.0.pre4 features/support/env.rb
aruba-0.11.0.pre3 features/support/env.rb
aruba-0.11.0.pre2 features/support/env.rb
aruba-0.11.0.pre features/support/env.rb
aruba-0.10.2 features/support/env.rb
aruba-0.10.1 features/support/env.rb
aruba-0.10.0 features/support/env.rb
aruba-0.10.0.pre2 features/support/env.rb
aruba-0.10.0.pre features/support/env.rb
aruba-0.9.0 features/support/env.rb
aruba-0.9.0.pre2 features/support/env.rb
aruba-0.9.0.pre features/support/env.rb