test/test_logging.rb in sidekiq-4.2.7 vs test/test_logging.rb in sidekiq-4.2.8

- old
+ new

@@ -3,33 +3,33 @@ require 'sidekiq/logging' class TestLogging < Sidekiq::Test describe Sidekiq::Logging do describe "#with_context" do - def context + def ctx Sidekiq::Logging.logger.formatter.context end it "has no context by default" do - context.must_equal nil + assert_nil ctx end it "can add a context" do Sidekiq::Logging.with_context "xx" do - context.must_equal " xx" + assert_equal " xx", ctx end - context.must_equal nil + assert_nil ctx end it "can use multiple contexts" do Sidekiq::Logging.with_context "xx" do - context.must_equal " xx" + assert_equal " xx", ctx Sidekiq::Logging.with_context "yy" do - context.must_equal " xx yy" + assert_equal " xx yy", ctx end - context.must_equal " xx" + assert_equal " xx", ctx end - context.must_equal nil + assert_nil ctx end end end end