0
由於我特林註銷與用戶的請求規範的一部分:導軌rspec的水豚 - 未定義的方法`SIGN_OUT」爲#<類別:0x000000099a4b20>(NoMethodError)
sign_out @user
但我得到的錯誤
undefined method `sign_out' for #<Class:0x000000099a4b20> (NoMethodError)
代碼:
require 'spec_helper'
include Warden::Test::Helpers
...
before(:each) do
@admin = Factory(:admin_user)
sign_in @admin
end
...
context "When Admin users logout they are returned to the admin login." do
before(:each) do
sign_out(:user)
end
subject { current_path }
it { should == new_admin_user_session_path }
end
你可以發佈周圍的規範代碼嗎? –
添加了代碼。 –
什麼是'sign_in'和'sign_out'?你在談論[這個管理員](https://github.com/hassox/warden)嗎? –