Created
June 27, 2011 17:22
-
-
Save diabolo/1049317 to your computer and use it in GitHub Desktop.
Spork Cucumber Fail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | |
# It is recommended to regenerate this file in the future when you upgrade to a | |
# newer version of cucumber-rails. Consider adding your own code to a new file | |
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | |
# files. | |
require 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
require 'cucumber/rails' | |
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In | |
# order to ease the transition to Capybara we set the default here. If you'd | |
# prefer to use XPath just remove this line and adjust any selectors in your | |
# steps to use the XPath syntax. | |
Capybara.default_selector = :css | |
end | |
Spork.each_run do | |
# By default, any exception happening in your Rails application will bubble up | |
# to Cucumber so that your scenario will fail. This is a different from how | |
# your application behaves in the production environment, where an error page will | |
# be rendered instead. | |
# | |
# Sometimes we want to override this default behaviour and allow Rails to rescue | |
# exceptions and display an error page (just like when the app is running in production). | |
# Typical scenarios where you want to do this is when you test your error pages. | |
# There are two ways to allow Rails to rescue exceptions: | |
# | |
# 1) Tag your scenario (or feature) with @allow-rescue | |
# | |
# 2) Set the value below to true. Beware that doing this globally is not | |
# recommended as it will mask a lot of errors for you! | |
# | |
ActionController::Base.allow_rescue = false | |
# Remove/comment out the lines below if your app doesn't have a database. | |
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead. | |
begin | |
DatabaseCleaner.strategy = :transaction | |
rescue NameError | |
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it." | |
end | |
# You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios. | |
# See the DatabaseCleaner documentation for details. Example: | |
# | |
# Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do | |
# DatabaseCleaner.strategy = :truncation, {:except => %w[widgets]} | |
# end | |
# | |
# Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do | |
# DatabaseCleaner.strategy = :transaction | |
# end | |
# | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.1.0.rc4' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2' | |
# Asset template engines | |
gem 'sass-rails', "~> 3.1.0.rc" | |
gem 'coffee-script' | |
gem 'uglifier' | |
gem 'jquery-rails' | |
# Use unicorn as the web server | |
# gem 'unicorn' | |
# Deploy with Capistrano | |
gem 'capistrano' | |
# To use debugger | |
gem 'ruby-debug19', :require => 'ruby-debug' | |
group :development,:test do | |
gem "rspec-rails" | |
gem "cucumber-rails" | |
gem 'database_cleaner' | |
gem 'spork', '>=0.9.0.rc8' | |
gem 'rb-fsevent' | |
gem 'guard-spork' | |
gem 'guard-rspec' | |
gem 'guard-cucumber' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➥ spork cuc | |
Using Cucumber | |
Preloading Rails environment | |
Loading Spork.prefork block... | |
DEPRECATION WARNING: Fixture is deprecated! Use ActiveRecord::Fixture instead. (called from block in <top (required)> at /Users/andy/Sites/commerce/features/support/env.rb:11) | |
DEPRECATION WARNING: Fixtures is deprecated! Use ActiveRecord::Fixtures instead. (called from block in <top (required)> at /Users/andy/Sites/commerce/features/support/env.rb:11) | |
undefined method `World' for main:Object (NoMethodError) | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/cucumber-rails-1.0.2/lib/cucumber/rails/world.rb:25:in `<top (required)>' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `block in require' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:225:in `load_dependency' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/cucumber-rails-1.0.2/lib/cucumber/rails.rb:19:in `<top (required)>' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `block in require' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223:in `block in load_dependency' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:639:in `new_constants_in' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223:in `load_dependency' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237:in `require' | |
/Users/andy/Sites/commerce/features/support/env.rb:11:in `block in <top (required)>' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork.rb:24:in `prefork' | |
/Users/andy/Sites/commerce/features/support/env.rb:10:in `<top (required)>' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:233:in `load' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:233:in `block in load' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223:in `block in load_dependency' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:639:in `new_constants_in' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223:in `load_dependency' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:233:in `load' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/test_framework.rb:138:in `block (2 levels) in preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/app_framework/rails.rb:8:in `preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/test_framework.rb:134:in `block in preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork.rb:62:in `exec_prefork' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/test_framework.rb:120:in `preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/test_framework/cucumber.rb:17:in `preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/run_strategy/forking.rb:25:in `preload' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/runner.rb:74:in `run' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/lib/spork/runner.rb:10:in `run' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/gems/spork-0.9.0.rc8/bin/spork:10:in `<top (required)>' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/bin/spork:19:in `load' | |
/Users/andy/.rvm/gems/ruby-1.9.2-p180@commerce/bin/spork:19:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment