[rspec-users] RESTful Routes
voodoorai2000 at gmail.com
Mon Feb 4 19:35:58 EST 2008
> On 4.2.2008, at 19.16, Raimond Garcia wrote:
>> Interesting Jarkko...
>> The restful routes, seem clearer than using urls, maybe not so much
>> for this case, but for very long urls, that include for example the
>> title of a blog, I would rather use blog_path(@blog).
>> Yes, I want to test the full stack, for sure! However, I don't see
>> using named routes, stops you from doing this....
>> Webrat two thumbs up, I've been using selenium up to now, but would
>> like to try other alternatives to see which one works better.
> What I mean by testing the full stack is that you'd e.g. have this in
> your story:
> clicks_button "Delete"
> If you just use "delete some_url", there are two things that could be
> 1) You have forgotten the DELETE method from your delete button.
> 2) The actual url in the form doesn't actually point to some_url.
> Neither of the two would be caught unless you used something like
> Webrat to drill through the whole stack. If you're using blog_path in
> the story, I feel like you're using the route to test itself.
> Jarkko Laine
Excellent observations Jarkko!
I'm still trying to get my head around the concept of "testing the
full stack" and you just enlightened me a little more.
More information about the rspec-users