1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Merge pull request #7084 from LTe/logger_default_separator"

This reverts commit c08f30ff5f, reversing
changes made to e243a8a32e.
This commit is contained in:
Aaron Patterson 2012-07-18 13:32:21 -07:00
parent fe5b943d9f
commit e482100d6e
2 changed files with 3 additions and 14 deletions

View file

@ -31,7 +31,7 @@ module ActiveSupport
def tags_text
tags = current_tags
if tags.any?
tags.collect { |tag| "[#{tag}] " }.join('')
tags.collect { |tag| "[#{tag}] " }.join
end
end
end

View file

@ -10,13 +10,8 @@ class TaggedLoggingTest < ActiveSupport::TestCase
end
setup do
@output = StringIO.new
@logger = ActiveSupport::TaggedLogging.new(MyLogger.new(@output))
@separator = $,
end
after do
$, = @separator
@output = StringIO.new
@logger = ActiveSupport::TaggedLogging.new(MyLogger.new(@output))
end
test "tagged once" do
@ -74,10 +69,4 @@ class TaggedLoggingTest < ActiveSupport::TestCase
assert_equal "[BCX] [Jason] Funky time\n[BCX] Junky time!\n", @output.string
end
test "using the correct separator" do
$, = "_"
@logger.tagged("BCX", "BDX") { @logger.info "Funky time" }
assert_equal "[BCX] [BDX] Funky time\n", @output.string
end
end