Skip to content

Instantly share code, notes, and snippets.

@snusnu
Created May 8, 2009 03:22
Show Gist options
  • Save snusnu/108593 to your computer and use it in GitHub Desktop.
Save snusnu/108593 to your computer and use it in GitHub Desktop.
# stick this in spec_helper.rb
# this will append a <br /> to every logged message, which produces
# nicely formatted DataMapper debug outputs in Textmate's RSpec Bundle's output
module DataMapper
class TextmateRspecLogger < Logger
def prep_msg(message, level)
"#{super}<br />"
end
end
end
# comment this for spec runs where you don't need to see logs
DataMapper::TextmateRspecLogger.new(STDOUT, :debug)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment