Re: [rspec-users] Problem with testing Rails action that uses return keyword

2009-05-27 Thread David Chelimsky
On Tue, May 19, 2009 at 5:13 PM, szimek wrote: > Hi, > > I'm trying to test Rails action that looks like this: > > def create >  unless facebook_session >    authentication_failed and return >  end >  ... > �...@facebook_user = facebook_session.user >  ... > end > > authentication_failed method re

[rspec-users] Problem with testing Rails action that uses return keyword

2009-05-19 Thread szimek
Hi, I'm trying to test Rails action that looks like this: def create unless facebook_session authentication_failed and return end ... @facebook_user = facebook_session.user ... end authentication_failed method redirects to '/'. The test looks like this: it 'should call authentica