[rspec-users] Then I should be on /users/3/posts/8/comments/2/edit
joshknowles at gmail.com
Fri Apr 10 00:58:07 EDT 2009
On Thu, Apr 9, 2009 at 11:27 PM, Gavin Hughes <lists at ruby-forum.com> wrote:
> The problem is actually this:
> And I fill in ...
> And I press "Create Comment"
> Then I should be on [the correct page, ie.
> How do you write a step for that?
Personally I try and stay away from step-matchers based on URLs. Do
you really care about what page you're on?
I would instead check the response for the "Thank you for posting" or
whatever message that you're probably showing.
If however you want to check the page, do something like
response.url.should == "/blah"
email: joshknowles at gmail.com
More information about the rspec-users