In case you wondered: The opinions expressed in this email are my own
and do not necessarily reflect the views of any former, current or
future employers of mine.
It looks good, but the before stuff doesn’t work for me - it looks as
though the rails environment hasn’t been loaded yet - I get ’
uninitialized constant User (NameError)’
User.create! :name => ‘matt’
the rails environment hasn’t been loaded yet - I get ’ uninitialized
constant User (NameError)’
I assume you’ve followed the Wiki instructions about how to set up
Cucumber with Rails: GitHub: Let’s build from here · GitHub (I should move this to
a separate Rails page)
If I had a number of steps, stories and runners where would I put the
kernal at_exit method?
At the last ‘Then’ in a step file? At the bottom of that particular
runner file? I assume there would be numerous at_exit methods i.e.
different teardowns.
No, never inside a step. You should only register each at_exit hook
once.
At the bottom of that particular
runner file? I assume there would be
Not sure what you mean by runner file. Stick the global setup code and
at_exit hook(s) at the top level in a ruby file inside your steps
folder. This file shouldn’t contain any step defs.
I assume you’ve followed the Wiki instructions about how to set up
Cucumber with Rails: GitHub: Let’s build from here · GitHub (I should move this to
a separate Rails page)