-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Before Rspec 3 I've stubbed controller helper method this way:
before do
expect(view).to receive(:current_customer).and_return(FactoryGirl.build(:customer)
end
Now, i'm getting error: #<#<Class:0x007fc72addeea8>:0x007fc72add56f0 .... >does not implement: current_customer
Thats right. There is no method current_customer
on rendered view. So I can't stub it.
There is no such method on anonymous controller too.
So how should I stub controller helpers while testing view?