0
你好我試圖存根在控制器中的around_filter方法,該方法返回true始終,在rspec的around_filter stubbing在Rspec中?
before(:each) do
controller.stub(:catch_exceptions).and_return(true)
end
after(:each) do
controller.stub(:catch_exceptions).and_return(true)
end
使用下面的源代碼,但它失敗。當我改變那個特定的方法,因爲before_filter然後它工作正常?任何人都可以幫助我嗎?
謝謝你這麼多@Uri阿加西 – ferdy