Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Sep 4, 2016
1 parent edbca13 commit 755f96b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/timber/probes/action_controller_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class ActionControllerBase < Probe
module InstanceMethods
def process(*args)
request_context = Contexts::HTTPRequests::ActionControllerSpecific.new(self)
#organization_context = Contexts::Organizations::ActionController.new(self)
#user_context = Contexts::Users::ActionController.new(self)
organization_context = Contexts::Organizations::ActionController.new(self)
user_context = Contexts::Users::ActionController.new(self)
response_context = Contexts::HTTPResponses::ActionController.new(self)
# The order is relevant here, request_context is higher in the hierarchy
CurrentContext.add(request_context, response_context) do
CurrentContext.add(request_context, organization_context, user_context, response_context) do
super
end
end
Expand Down
1 change: 0 additions & 1 deletion lib/timber/probes/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def add(level, *args, &block)
_timber_old_add(level, *args, &block)
else
context = Contexts::Logger.new(level, progname)
Config.logger.warn("Adding logger for #{level} #{args.inspect}")
CurrentContext.add(context) do
_timber_old_add(level, *args, &block)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/timber/probes/logger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end

it "should ignore Config.logger" do
expect(Timber::CurrentContext).to receive(:add).with(kind_of(context_class)).and_yield.once
expect(Timber::CurrentContext).to_not receive(:add).with(kind_of(context_class))
Timber::Config.logger.info("text")
end
end
Expand Down

0 comments on commit 755f96b

Please sign in to comment.