On Fri, Jul 4, 2008 at 4:19 PM, Ben Mabey <[EMAIL PROTECTED]> wrote:
> Gregg Pollack wrote:
>> 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.

Damn, that is a good idea.

> In your spec_helper.rb just put:
> Spec::Runner.configure do |config|
>  ...
>  config.before(:each) do
>     full_example_description = "#{self.class.description} [EMAIL PROTECTED]"
>     RAILS_DEFAULT_LOGGER.info("\n\nStarting
> #{full_example_description}\n\n#{'-' * (9 +
> full_example_description.length)}")
>  end
>
> end

Beaten at the gate by about 30 seconds :)  My implementation was
basically the same!

> Note that the constant RAILS_DEFAULT_LOGGER is being used since
> Rails::logger is only available in 2.1.

Didn't think of that bit though.  Well done.

-- 
http://lindsaar.net/
Rails, RSpec, Puppet and Life blog....
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to