【发布时间】:2012-08-15 18:59:25
【问题描述】:
我的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 一起工作?
【问题讨论】:
标签: javascript cucumber capybara rack declarative-authorization