Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
I think part of my problem, now that I think about it, is that I'm trying to test the method instead of testing behavior. This render_403 method should probably not be tested directly from the application_controller_spec since it doesnt get actually called their. I should test the render method f

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 9:15 AM, Craig Jolicoeur <[EMAIL PROTECTED]> wrote: > Thanks David. > > I changed to using get :render_403 and it worked. Well, worked after > I added in those routes to my routes.rb file. > > I dont have the default routes for /:controller/:action/:id so it was > failing an

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 8:55 AM, Craig Jolicoeur <[EMAIL PROTECTED]> wrote: >>>First off - should_receive *is* a test - why would you write a test in > the setup? > > Not sure what you mean by that. I'm not writing a test in the setup > routine. should_receive is an expectation which could pass or

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
>>First off - should_receive *is* a test - why would you write a test in the setup? Not sure what you mean by that. I'm not writing a test in the setup routine. Also, I'm not setting an expectation on a method call. should render_file is in the right place. On Sep 5, 11:48 pm, Scott Taylor <[E

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
Thanks David. I changed to using get :render_403 and it worked. Well, worked after I added in those routes to my routes.rb file. I dont have the default routes for /:controller/:action/:id so it was failing and I dont want custom routes for these two methods because they will be called from othe

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Fri, Sep 5, 2008 at 10:48 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Sep 5, 2008, at 10:18 PM, Craig P Jolicoeur wrote: > >> I'm having some trouble trying to spec some methods in my Rails >> application controller. >> >> I'm new to rspec converting over from straight test::unit. >> >> H

Re: [rspec-users] issue with application controller spec

2008-09-05 Thread Scott Taylor
On Sep 5, 2008, at 10:18 PM, Craig P Jolicoeur wrote: I'm having some trouble trying to spec some methods in my Rails application controller. I'm new to rspec converting over from straight test::unit. Here is the method in my application.rb controller that I'm trying to spec def render