Skip to content

Commit

Permalink
RAILS_ENV features is the default, not cucumber
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Jun 11, 2009
1 parent 4f4c7f3 commit 234885c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions features/cucumber_rails_integration.feature
Expand Up @@ -17,7 +17,7 @@ Feature: Cucumber integration with rails
# need to restart spork for it take effect.
# Sets up the Rails environment for Cucumber
ENV['RAILS_ENV'] = "cucumber"
ENV['RAILS_ENV'] = "features"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'webrat'
Expand Down Expand Up @@ -59,22 +59,22 @@ Feature: Cucumber integration with rails
"""
$loaded_stuff << 'features/support/cucumber_rails_helper.rb'
"""
And a file named "config/environments/cucumber.rb" with:
And a file named "config/environments/features.rb" with:
"""
# your cucumber env here
"""
And a file named "config/database.yml" with:
"""
cucumber:
features:
adapter: sqlite3
database: db/cucumber.sqlite3
database: db/features.sqlite3
timeout: 5000
"""
And a file named "features/step_definitions/cucumber_rails_steps.rb" with:
"""
Then "it should work" do
Spork.state.should == :using_spork
RAILS_ENV.should == 'cucumber'
RAILS_ENV.should == 'features'
$loaded_stuff.should include('ActiveRecord::Base.establish_connection')
$loaded_stuff.should include('User')
$loaded_stuff.should include('UserObserver')
Expand Down

1 comment on commit 234885c

@bmabey
Copy link
Contributor

@bmabey bmabey commented on 234885c Jun 11, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Tim.. FYI Cucumber decided to make 'cucumber' and not 'features' it's default RAILS_ENV. I don't know if that really changes what you did here, but I thought I'd let you know...

Please sign in to comment.