[rspec-users] [cucumber] Nested resource in paths.rb
GMin, Morten K. Holst
morten at gmin.org
Sun Apr 5 16:40:04 EDT 2009
Hello Rspec Users,
I was wondering how you specify a nested resource in cucumber. So for
Given I have a blogpost titled Question For Nice Rspec Users
When I am on the list of comments for Question For Nice Rspec Users
Then I should see "Answer"
Now, as one might expect, blogpost has_many :comments, so my question is
How should I write the "when-case" for "the list of comments for Question
For Nice Rspec Users" in paths.rb?
What I'm asking about in particular is how to extract the "Question For Nice
Rspec Users" part and use it to find the blogpost I created earlier and thus
generate the path from a nested route e.g. comments_path(blogpost).
Many thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users