[rspec-users] Global setup method goes where?
lists at ruby-forum.com
Fri Jul 4 00:52:43 EDT 2008
You know how sometimes you look in /log/test.log for debug information
like which test caused a certain render or query?
I found this post which shows how to get test information printed out in
your test.log with test:unit and shoulda, but I'm not sure there's a way
to do it with RSpec.
test:unit allows you to put "setup :blah" in your test_helper.rb, and
then the blah method gets called before each test. This can be used to
print out a log statement saying 'we're runnig test ___". How would we
do the same in rspec with the spec_helper.rb so that we can print this
data out in our logs too?
Any takers? I'm sure I could probably figure this out if I dove deep
into the code base, but I get the feeling someone must have done this
I'm going to cover this on the next Rails Envy podcast, so you'll get
some credit for a good answer, and a link if you post the answer to your
blog (assuming you want the publicity). ;-)
Posted via http://www.ruby-forum.com/.
More information about the rspec-users