私の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。