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

Pat Maddox pat.maddox at gmail.com
Fri Apr 10 00:25:39 EDT 2009


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 comment"
And I should not see "My old comment"

This way you're testing the feature itself, rather than some
implementation detail such as the current url.

Pat

On Thu, Apr 9, 2009 at 8: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.
> /users/3/posts/8/comments/2/edit]
>
> How do you write a step for that?
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list