私のfeatures/support/env.rb
ファイルには次のものがあります。
require 'declarative_authorization/maintenance'
World(Authorization::TestHelper)
私は機能ファイルにこれを持っています:
When I view the list of users
Then I see the list of users page
そして、これはステップファイルで:
When /^I view the list of users$/ do
without_access_control{ visit users_path }
end
Then /^I see the list of users page$/ do
current_path.should eq(users_path)
end
feature にタグを付けるまではすべて正常に実行され@javascript
、エラーが発生します。
expected: "/users"
got: "/users/sign_in"
モードwithout_access_control
で実行するときに尊重する方法を誰か教えてもらえますか?@javascript
同じ質問をする別の方法は、Declarative Authorization の組み込みのテストヘルパーwithout_access_control
をどのように操作rack_test
するかということだと思いますjs=true
。