I have a cucumber test, which needs to refer to an object that is created by an observer and am wondering if there is a way to do that.
Specifically,
- There is a Profile instance that is automatically created when a User instance is created.
- In Cucumber (and using Pickle), I create a User instance:
- The user_observer automatically creates a profile associated with "u_1"
- And I want to refer to the Profile in a different scenario.
For example.
开发者_开发技巧Given the following users exist:
| user | first_name | last_name |
| test | john | malkovich |
And the following resume_packs exist:
| profile | page | pack_name |
| test.profile | 2 | who's who |
test.profile is a space filler, so what is the actual way to refer to test.profile?
I would advice to use your own step definitions and create the stuff you need yourself.
Given the user "John Malkovich" has a resume pack
精彩评论