Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-10 Thread Stephen Eley
On Fri, Apr 10, 2009 at 11:49 AM, Lenny Marks wrote: > > One place I've actually been interested in testing URLs was to verify that > the app actually redirected after a form submission. I can agree with this, and I had a similar need just the other day. I had an action that redirected to differ

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-10 Thread Pat Maddox
On Fri, Apr 10, 2009 at 9:40 AM, Pat Maddox wrote: > I would just test that at the controller level I would _specify_ that at the controller level. BAD BDD evangelist :P ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailma

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-10 Thread Pat Maddox
On Fri, Apr 10, 2009 at 8:49 AM, Lenny Marks wrote: > > On Apr 10, 2009, at 12:51 AM, Ben Mabey wrote: > >> Gavin Hughes wrote: >>> >>> "Then I should be on /users/3/posts/8/comments/2/edit" >>> >>> What's the solution for parsing out and matching and arbitrarily deep >>> nested route? >>> >> Hi G

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-10 Thread Lenny Marks
On Apr 10, 2009, at 12:51 AM, Ben Mabey wrote: Gavin Hughes wrote: "Then I should be on /users/3/posts/8/comments/2/edit" What's the solution for parsing out and matching and arbitrarily deep nested route? Hi Gavin, Let me try to answer your question without actually answering it. :) I gen

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Ben Mabey
Gavin Hughes wrote: "Then I should be on /users/3/posts/8/comments/2/edit" What's the solution for parsing out and matching and arbitrarily deep nested route? Hi Gavin, Let me try to answer your question without actually answering it. :) I generally don't test my URLs. IMO, for the majorit

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Gavin Hughes
Ben, Josh Makes perfect sense. The user won't be looking at the URL. He'll expect some result on the page, thus we test for that. Thanks! Gavin -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Pat Maddox
I'm not sure, cause I've never tried to write a step like that. I would rather do Then I should see "Editing 'My sweet comment'" Even better would be to actually edit the comment and make sure that it changed. So maybe When I edit the comment to be "My new comment" Then I should see "My new com

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Josh Knowles
On Thu, Apr 9, 2009 at 11:27 PM, Gavin Hughes wrote: > The problem is actually this: > > And I fill in ... > And I press "Create Comment" > Then I should be on [the correct page, ie. > /users/3/posts/8/comments/2/edit] > > How do you write a step for that? Personally I try and stay away from step

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Ben Mabey
Gavin Hughes wrote: The problem is actually this: And I fill in ... And I press "Create Comment" Then I should be on [the correct page, ie. /users/3/posts/8/comments/2/edit] How do you write a step for that? I just saw this second message.. My assumption about what you were testing was of

Re: [rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Gavin Hughes
The problem is actually this: And I fill in ... And I press "Create Comment" Then I should be on [the correct page, ie. /users/3/posts/8/comments/2/edit] How do you write a step for that? -- Posted via http://www.ruby-forum.com/. ___ rspec-users maili

[rspec-users] Then I should be on /users/3/posts/8/comments/2/edit

2009-04-09 Thread Gavin Hughes
"Then I should be on /users/3/posts/8/comments/2/edit" What's the solution for parsing out and matching and arbitrarily deep nested route? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.