Hello Rspec Users,
I was wondering how you specify a nested resource in cucumber. So for
example:
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
this:
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.
- Morten