> I was led to believe Rails automatically handled RecordNotFounds with a
> 404, meaning I didn't have to catch them myself.
>
> I made sure requests weren't considered local in the test environment to
> trigger the 404 page instead of the debug info. I tried putting a
> rescue_action_in_publ
Jarkko Laine wrote:
> On 13.2.2008, at 21.09, Brad Carson <[EMAIL PROTECTED]> wrote:
>
>> - should not assign an event (ERROR - 3)
>>
>> ActiveRecord::RecordNotFound in 'EventsController attempt to show
>> non-existing event should render 404'
>&
Pat Maddox wrote:
> Try
>
> Event.stub!(:find).and_raise(RecordNotFound)
To my credit, I did try that (though ActiveRecord::RecordNotFound, of
course) but then I get:
EventsController attempt to show non-existing event
- should render 404 (ERROR - 2)
- should not assign an event (ERROR - 3)
Ac
I'm trying to spec a dead simple "show non-existent record should render
404" case, but it seems the RecordNotFound exception is making it
impossible for some reason.
#controller
def show
@event = Event.find(params[:id])
end
#spec - pretty much straight from the rspec site
before do
Event
Scott Taylor wrote:
>> You were absolutely right. My gem configuration is kind of mangled
>> (Leopard thing) and ZenTest would only update to 3.5.0 so I thought it
>> was the most recent version.
>
> Strange. Are you using the rubygems which comes with leopard? I
> wonder if it's a bug...
I am
Scott Taylor wrote:
> On Nov 20, 2007, at 12:23 PM, Brad Carson wrote:
>
>> I'm having trouble getting autotest to run "out of the box" with
>> rspec.
>> I've got a Leopard setup with Zentest 3.5.0, rspec on trunk, and rails
>> 2.0PR. No &quo
I'm having trouble getting autotest to run "out of the box" with rspec.
I've got a Leopard setup with Zentest 3.5.0, rspec on trunk, and rails
2.0PR. No ".autotest" file.
There are a couple of issues:
1. Running 'autotest' inititally yields a command not found for "spec
--diff unified etc etc".