0

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

4

1 に答える 1

0

一般的なコンセンサスは、これは不可能だと思われますが、誰かが私が間違っていることを証明した場合は更新されます!

于 2012-08-23T15:25:22.473 に答える