restful_authenticationとcucumberでストーリーを利用するにはどうすればいいですか?
- rails(2.3.2)の最新の安定版、
- rspec(1.2.2)、
- cucumber(0.2.0.4をクローニングした後... 2009年3月24日に出てきました)、
- rspec-rails(1.2.2)、 restful-authentication
- (固定formatted_user_pathおよびその他のいくつかの問題)、 webrat
- 、
- rubyist-aasm(およびいくつかの他)きれいなRailsアプリケーションへ
、および以下の(私は信じているものを)各プラグインのすべての命令、キュウリの物語はまだ:-(失敗しています。ここでの問題の概要です:
- リダイレクトが作成されたにもかかわらず、右バット働いていない「map.rootを:コントローラ=> 『my_controller』」ルート:
expected redirect to "/", got no redirect (Spec::Expectations::ExpectationNotMetError) /cygdrive/c/development/test/vendor/plugins/rspec/lib/spec/expectations.rb:57:in `fail_with' /cygdrive/c/development/test/vendor/plugins/rspec/lib/spec/expectations/handler.rb:14:in `handle_matcher' /cygdrive/c/development/test/vendor/plugins/rspec/lib/spec/expectations/extensions/object.rb:31:in `should'. /features/step_definitions/user_steps.rb:111:in `/^an? (.*) user named '(.*)'$/' features/sessions.feature:25:in `And an activated user named 'reggie''
- 物語は
logged_in?
を語りますメソッドは、features/step_definitions/ra_env.rb
ファイル呼び出しにもかかわらず保護されています。ApplicationController.send(:public, :logged\_in?, :current\_user, :authorized?)
スタブを必要とせずにこれらのメソッドを使用できるようにしますか?
ああ、私はautospecを実行しようとしているので、私はそれを始めるために、次のコマンドをやった:ただ、
export AUTOFEATURE=true rake spec:server:start ruby script/autospec
残念ながら、以下の回答はあまり役に立ちませんでした。そこにいる誰かが、少なくとも「保護された方法」のエラーがなぜ表示されているのか理解していますか? – btelles