Re: [rspec-users] how to stub the :current_user and any methods associated with it

2008-04-15 Thread newbie
> Not sure why you are stubbing entries on the controller ... entries is > called on the current user ... I have this method. I want to use this variable to loop the users @entries. So I'm testing to see that this variable is tested and works correctly. def main @entries = current_user.entrie

Re: [rspec-users] how to stub the :current_user and any methods associated with it

2008-04-12 Thread newbie
Hey Jarkko, Thanks for the feedback. I tried your suggestion and it doesn't seem to work. To quickly recap I'm just testing in my controller that this works def index @entries = current_user.entries end describe "on the main page" do it "should show all the current entries for the user" do

Re: [rspec-users] how to stub the :current_user and any methods associated with it

2008-04-10 Thread newbie
... > > Sorry this isn't extremely informative ... in a bit of a rush. Hopefully it > will point you in the appropriate direction. > > > > On Sun, Apr 6, 2008 at 2:17 PM, newbie <[EMAIL PROTECTED]> wrote: > > I'm new to Rspec and I'm having a bit of

[rspec-users] how to stub the :current_user and any methods associated with it

2008-04-07 Thread newbie
I'm new to Rspec and I'm having a bit of trouble with this controller that I'm testing. I think I'm doing it right but I guess my syntax is wrong. I'm currently using the "acts_as_authenticated" plug in. What I want to test out is EventController on entering the tickets_page - should show the tic