public
Last active

Cucumber Environment

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
# RVM: ruby-1.8.7-p330
# Culerity runs JRuby V1.5.6
# Everything is 64 bit on OSX
 
###### custom_env.rb
require File.expand_path(File.dirname(__FILE__) + '/../../config/factories')
require 'delorean'
 
ActiveRecord::TestCase.use_concurrent_connections
 
Capybara.default_wait_time = 8
Capybara.javascript_driver = :culerity
ActionController::Base.allow_rescue = false
After { Delorean.back_to_the_present }
 
###### vcr.rb: This file sets up auto recording of http requests for use with fakeweb. See https://github.com/myronmarston/vcr
 
require 'vcr'
 
VCR::Config.stub_with :fakeweb
VCR.config do |c|
c.cassette_library_dir = 'features/support/vcr'
puts "*** Recording html requests with vcr" if ENV['RECORD']
c.default_cassette_options = { :record => ENV['RECORD'] ? :all : :none }
c.ignore_localhost = true
end
 
Before do |scenario|
file = scenario.feature.file.gsub("features/", "").gsub(".feature", "")
VCR.insert_cassette("#{file}/#{scenario.name}")
end
After {|scenario| VCR.eject_cassette}
 
##### cucumber.rb
# Edit at your own peril - it's recommended to regenerate this file
# in the future when you upgrade to a newer version of Cucumber.
 
# IMPORTANT: Setting config.cache_classes to false is known to
# break Cucumber's use_transactional_fixtures method.
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
config.cache_classes = true
 
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
 
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
 
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
 
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = { :host => "localhost:3000"}
 
config.gem 'cucumber', :lib => false, :version => '0.9.4'
config.gem 'cucumber-rails', :lib => false, :version => '0.3.2'
config.gem 'culerity', :lib => false, :version => '0.2.12'
config.gem 'database_cleaner', :lib => false, :version => '0.6.0'
config.gem 'capybara', :lib => false, :version => '0.4.0'
config.gem 'delorean', :lib => false, :version => "0.2.1"
config.gem 'email_spec', :lib => false, :version => '0.6.4'
config.gem 'parallel_tests', :lib => false, :version => '0.4.8'
config.gem 'fakeweb', :lib => false, :version => '1.3.0'
config.gem 'rspec', :lib => false, :version => '1.3.0'
config.gem 'rspec-rails', :lib => false, :version => '1.3.2'

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.