[rspec-users] how to stub the :current_user and any methods associated with it
jarkko at jlaine.net
Sun Apr 13 13:03:29 EDT 2008
On 12.4.2008, at 22.24, newbie wrote:
> Hey Jarkko,
> Thanks for the feedback. I tried your suggestion and it doesn't seem
> to work.
What doesn't work?
> To quickly recap I'm just testing in my controller that this works
> def index
> @entries = current_user.entries
> describe "on the main page" do
> it "should show all the current entries for the user" do
> get :index
> assigns[:entries].should == @entries
I don't see you logging in a user anywhere.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2417 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rspec-users/attachments/20080413/c5ab6e24/attachment.bin
More information about the rspec-users