Sha256: 848feb1214d39b5fe37e26a76a19a5c8ee9528791ce1aba677e12dbed3f73666
Contents?: true
Size: 1014 Bytes
Versions: 2
Compression:
Stored size: 1014 Bytes
Contents
require 'simplecov' require 'aruba/cucumber' SimpleCov.command_name "features" Before do @aruba_timeout_seconds = 10 @busser_root_dirs = [] end After do |s| # Tell Cucumber to quit after this scenario is done - if it failed. # This is useful to inspect the 'tmp/aruba' directory before any other # steps are executed and clear it out. Cucumber.wants_to_quit = true if s.failed? # Restore environment variables to their original settings, if they have # been saved off ENV.keys.select { |key| key =~ /^_CUKE_/ }.each do |backup_key| ENV[backup_key.sub(/^_CUKE_/, '')] = ENV.delete(backup_key) end @busser_root_dirs.each { |dir| FileUtils.rm_rf(dir) } end def backup_envvar(key) ENV["_CUKE_#{key}"] = ENV[key] end def restore_envvar(key) ENV[key] = ENV.delete("_CUKE_#{key}") end def unbundlerize keys = %w[BUNDLER_EDITOR BUNDLE_BIN_PATH BUNDLE_GEMFILE RUBYOPT] keys.each { |key| backup_envvar(key) ; ENV.delete(key) } yield keys.each { |key| restore_envvar(key) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
busser-0.1.1 | features/support/env.rb |
busser-0.1.0 | features/support/env.rb |