mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #28171 from sorra/fresh-thread-tagged-logging
Improve test for TaggedLogging "keeps each tag in their own thread"
This commit is contained in:
commit
4d99720fd3
1 changed files with 2 additions and 1 deletions
|
@ -74,11 +74,12 @@ class TaggedLoggingTest < ActiveSupport::TestCase
|
|||
test "keeps each tag in their own thread" do
|
||||
@logger.tagged("BCX") do
|
||||
Thread.new do
|
||||
@logger.info "Dull story"
|
||||
@logger.tagged("OMG") { @logger.info "Cool story" }
|
||||
end.join
|
||||
@logger.info "Funky time"
|
||||
end
|
||||
assert_equal "[OMG] Cool story\n[BCX] Funky time\n", @output.string
|
||||
assert_equal "Dull story\n[OMG] Cool story\n[BCX] Funky time\n", @output.string
|
||||
end
|
||||
|
||||
test "keeps each tag in their own instance" do
|
||||
|
|
Loading…
Reference in a new issue