0

我在features/support/env.rb文件中的以下內容:使用聲明授權的「without_access_control」黃瓜的@javascript

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: "https://stackoverflow.com/users/sign_in" 

誰能告訴我如何尊重without_access_control@javascript模式下運行時?

我覺得問同一個問題的另一種方式是我怎麼聲明性授權的內置測試輔助without_access_controlrack_test工作,當js=true

回答

0

一般認爲這是不可能的,但如果有人證明我錯了會更新!