Pickle cucumber steps not recognized before creating the model.
Published on Jun 17, 2010The title kind of tell it all. I started to use pickle now for filling up and managing my test with cucumber. Fill up data, etc.
Pickle creates some step definitions for you to make things easy, what it’s much appreciated. There is a great RailCast on setting things up, you can watch it or read about it .
The problem I got was that I wrote the following Cucumber scenario:
And when running cucumber I got a message that indicates that I have an undefined step for the Given step and this bit of code:
Now that was a bit disconcerting since the Given step match this pickle steps:
Or so I though. The problem was that I didn’t have the model or the db table yet. That was a bit disconcerting, I could expect the error message to tell me something more in the line of: Ups, we couldn’t find a model for the User or something like.
Once you think about it make sense, since capture_plural_factory will be evaluate on runtime and won’t much any existing model.