spec/timber/logger_spec.rb in timber-2.1.0.rc3 vs spec/timber/logger_spec.rb in timber-2.1.0.rc4

- old
+ new

@@ -161,22 +161,22 @@ describe "#with_context" do let(:io) { StringIO.new } let(:logger) { Timber::Logger.new(io) } it "should add context" do - expect(Timber::CurrentContext.instance.send(:hash)).to eq({}) + expect(Timber::CurrentContext.instance.send(:hash)[:custom]).to be_nil logger.with_context(build: {version: "1.0.0"}) do - expect(Timber::CurrentContext.instance.send(:hash)).to eq({:custom=>{:build=>{:version=>"1.0.0"}}}) + expect(Timber::CurrentContext.instance.send(:hash)[:custom]).to eq({:build=>{:version=>"1.0.0"}}) logger.with_context({testing: {key: "value"}}) do - expect(Timber::CurrentContext.instance.send(:hash)).to eq({:custom=>{:build=>{:version=>"1.0.0"}, :testing=>{:key=>"value"}}}) + expect(Timber::CurrentContext.instance.send(:hash)[:custom]).to eq({:build=>{:version=>"1.0.0"}, :testing=>{:key=>"value"}}) end - expect(Timber::CurrentContext.instance.send(:hash)).to eq({:custom=>{:build=>{:version=>"1.0.0"}}}) + expect(Timber::CurrentContext.instance.send(:hash)[:custom]).to eq({:build=>{:version=>"1.0.0"}}) end - expect(Timber::CurrentContext.instance.send(:hash)).to eq({}) + expect(Timber::CurrentContext.instance.send(:hash)[:custom]).to be_nil end end describe "#info" do let(:io) { StringIO.new } \ No newline at end of file