Permalink
Browse files

Correctly detect Rails 3 in tests

  • Loading branch information...
1 parent d08d787 commit d15b7140fb01818158400ad9ffd40ba718ac49bf @gabebw gabebw committed May 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 features/step_definitions/rails_application_steps.rb
@@ -5,7 +5,7 @@
@terminal.cd(TEMP_DIR)
version_string = ENV['BUNDLE_GEMFILE'].scan(/\d\.\d\.\d/).first
- rails3 = Rails::VERSION::MAJOR == 3
+ rails3 = defined?(Rails) and Rails::VERSION::MAJOR == 3
if rails3
rails_create_command = 'new'

0 comments on commit d15b714

Please sign in to comment.