Before and After

132 views
Skip to first unread message

Rod Paddock

unread,
May 7, 2012, 10:15:46 AM5/7/12
to Turnip
From the sample code and docs I cannot tell if there is a mechanism
for doing Before and After sections in tests. Any guidance would be
great! Thanks!

Jonas Nicklas

unread,
May 7, 2012, 10:28:21 AM5/7/12
to ruby-...@googlegroups.com
Turnip is just RSpec, you can use RSpec's normal before and after hooks.

/Jonas

Rod Paddock

unread,
May 7, 2012, 10:50:48 AM5/7/12
to ruby-...@googlegroups.com
Thanks for the quick response.
--
Thanks
Rod Paddock
www.lostechies.com
www.codemag.com
www.dashpoint.com
Cell 512 560 8940

Jonas Nicklas

unread,
Nov 1, 2012, 4:38:30 AM11/1/12
to ruby-...@googlegroups.com
You can think that background->before, scenarion->it. Kind of like if
you were using the Capybara feature DSL. If you add your own before,
it will be loaded before the feature file is loaded, since RSpec's
before blocks are load order dependent, it will be run first. So the
order would be:

Your before block
Background
Scenario
Your after block

Makes sense?

/Jonas
Reply all
Reply to author
Forward
0 new messages