Created
May 8, 2009 03:22
-
-
Save snusnu/108593 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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