私はレールを初めて使用しており、rails 3 tutorialを実行しています。私は統合テストを実行する際に問題があります。メソッド「訪問」(Webrat?)は常に失敗するようです。これは私がRSpecのから取得したエラーメッセージのようなものです:レールチュートリアルでの統合テストの「訪問」に問題がある
Failure/Error: visit signup_path
Unknown Webrat mode: nil
Please ensure you have a Webrat configuration block that specifies a mode
in your test_helper.rb, spec_helper.rb, or env.rb (for Cucumber).
This configure block supercedes the need to require "webrat/<framework>".
For example:
Webrat.configure do |config|
config.mode = :rails
end
# ./spec/requests/users_spec.rb:27:in `block (5 levels) in <top (required)>'
# ./spec/requests/users_spec.rb:26:in `block (4 levels) in <top (required)>'
私はスペック/ spec_helpers.rbに上記Webrat configureコンブロックを追加しようとした、と私はこのエラーを取得する:
Failure/Error: visit signup_path
no such file to load -- action_controller/integration
# ./spec/requests/users_spec.rb:27:in `block (5 levels) in <top (required)>'
# ./spec/requests/users_spec.rb:26:in `block (4 levels) in <top (required)>'
私は読んだことがありますこの問題について他のトピックと彼らが使うことを提案「= config.modeを:ラック」:
Failure/Error: visit signup_path
undefined method `last_response' for #<RSpec::Core::ExampleGroup::Nested_5::Nested_1::Nested_2:0xa4b8aac>
# ./spec/requests/users_spec.rb:27:in `block (5 levels) in <top (required)>'
# ./spec/requests/users_spec.rb:26:in `block (4 levels) in <top (required)>'
私は私がwin7x64にチュートリアルを開始したことに注目することが重要であるかもしれないと思い、私はそうするならば、私はこのエラーを取得し、 、bu私は、同じエラーでubuntu上のリポジトリの複製を試みました。
のgit://github.com/ender4/sample_app2.git ノートが2^
は、私は同様の話題をたくさん読みましたが、ほとんどのソリューションは以下にあり、誰が見てみたい場合はここにリポジトリがあります古いバージョンのrails/rspec/webratや他のテストフレームワーク(キュウリのようなもの)のために、私はそれらがどのように適用されるかわかりません。
ご協力いただければ幸いです。