我的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
一切都运行良好,直到我@javascript
标记该功能,然后出现错误:
expected: "/users"
got: "/users/sign_in"
谁能告诉我在@javascript
模式下运行时如何尊重without_access_control
?
我认为提出相同问题的另一种方法是,当js=true
时,我如何让声明式授权的内置测试助手without_access_control
与rack_test
一起使用?
普遍的共识似乎是这是不可能的,但如果有人证明我错了,就会更新!