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
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
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
>>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
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
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
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