Re: [rspec-users] Problem verifying routing error

2009-06-16 Thread r_j_h_box-sf
I finally figured this out. lambda { route_for(:controller => "designs", :action => "create").should == "anything" }.should raise_error( ActionController::RoutingError ) The clue was that I wasn't getting a routing error until I tried to compare route_for() with something. route_for() seems t

Re: [rspec-users] Problem verifying routing error

2009-06-16 Thread David Chelimsky
On Tue, Jun 16, 2009 at 3:07 PM, wrote: > > I finally figured this out. > > lambda { route_for(:controller => "designs", :action => "create").should == > "anything" }.should raise_error( ActionController::RoutingError ) > > The clue was that I wasn't getting a routing error until I tried to compa

Re: [rspec-users] Problem verifying routing error

2009-06-16 Thread r_j_h_box-sf
David, thank you for your reply on this. I really dig the expect { }.to raise_error() syntax!! To clarify: All the things you're claiming match my expectation. Unfortunately, my expectation does not match reality according to my tests. The thing is, route_for([bad stuff]) does not in and of

Re: [rspec-users] Spork and Merb and rSpec

2009-06-16 Thread Tim Harper
I'm interested to hear your experience with Spork and Merb. Right now Spork is doing some hooks in to rails (that are actually kind of aggressive right now) to help make spork work more out of the box - specifically, preventing rails from preloading application models and controllers before the fo

Re: [rspec-users] Problem verifying routing error

2009-06-16 Thread r_j_h_box-sf
Here's another interesting symptom. After tracing through the code, I've come to the understanding that the current implementation (delegated to outside rspec, I understand) of route "generation" is not testing generation at all, but rather is using backward-recognition as a proxy. Further, t