[rspec-users] RecordNotFound bubbling thru to cucumber

aslak hellesoy aslak.hellesoy at gmail.com
Mon Feb 9 06:11:27 EST 2009


On Fri, Feb 6, 2009 at 6:12 PM, Jeff Talbot <jeff.a.talbot at gmail.com> wrote:
> Hello,
>
> I have a controller action that raises a RecordNotFound exception if
> you're not allowed to see something. In my global application
> controller (application.rb), I catch these and render the 404
> template. But when I run cucumber (using webrat), it's getting the
> full stacktrace (the step blows up). Any ideas why? I have

It's because Cucumber's Rails support configures ActionController to
send all errors straight through.
See cucumber/rails/world.rb

Patches and suggestions about how to improve this are welcome.
(In most cases it's easier to spot errors when exceptions ripple through)

Aslak

> consider_all_requests_local turned off in my test.rb.
>
> Jeff
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Aslak (::)


More information about the rspec-users mailing list