2011-07-07 10 views
0

キュウリ1.0.0とキュウリレール1.0.2のレールアプリがあります。これらのテストは昨晩うまくいった。今日、私はいくつかのステップ定義を変更し、テストを実行しようとし、以下のエラーが発生しました。キュウリのサポートファイルで何も変更していない。何か案は?キュウリ試験の実行中にエラーが発生しました - ロードするファイルがありません

grouperty $ cucumber 
Using the default profile... 
no such file to load -- /Users/davidtuite/wd/grouperty/features/config/environment(LoadError) 
/Users/davidtuite/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
/Users/davidtuite/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
/Users/davidtuite/wd/grouperty/features/support/env.rb:12:in `block in <top (required)>' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/spork-0.9.0.rc9/lib/spork.rb:24:in `prefork' 
/Users/davidtuite/wd/grouperty/features/support/env.rb:10:in `<top (required)>' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/rb_support/rb_language.rb:143:in `load' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime/support_code.rb:176:in `load_file' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime/support_code.rb:78:in `block in load_files!' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime/support_code.rb:77:in `each' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime/support_code.rb:77:in `load_files!' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime.rb:137:in `load_step_definitions' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/runtime.rb:39:in `run!' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/cli/main.rb:43:in `execute!' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/lib/cucumber/cli/main.rb:20:in `execute' 
/Users/davidtuite/.rvm/gems/[email protected]/gems/cucumber-1.0.0/bin/cucumber:14:in `<top (required)>' 
/Users/davidtuite/.rvm/gems/[email protected]/bin/cucumber:19:in `load' 

/Users/davidtuite/.rvm/gems/[email protected]/bin/cucumber:19:inは `」ここ/features/support/env.rbの内容です。大部分はspork gem(v0.9.0.rc9)によって生成されたことに注意してください。

# 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 
    ENV["RAILS_ENV"] ||= 'test' 
    require File.expand_path("../../config/environment", __FILE__) 
    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('[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]') do 
    #  DatabaseCleaner.strategy = :transaction 
    # end 
    # 
end 
+0

投稿してください '/ユーザ/ davidtuite/WD/grouperty /機能/サポートの原因が必要です/ env.rb' code – Bohdan

+0

'env.rb'を付け加えました。 –

答えて

4

この行は

require File.expand_path("../../config/environment", __FILE__) 

/Users/davidtuite/wd/grouperty/features/config/environment 
存在しない

が、これは誤り

+0

明らかになったら明らかになりました!ありがとう。 –

関連する問題