Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added #disabled? method and specs

  • Loading branch information...
commit 08cfb0d66dcf40d71d0be29372a019066e9ffcba 1 parent 5f43797
@ajsharp authored
Showing with 11 additions and 1 deletion.
  1. +1 −1  lib/bunyan.rb
  2. +10 −0 spec/bunyan_spec.rb
View
2  lib/bunyan.rb
@@ -46,7 +46,7 @@ def disabled(dis = nil)
alias_method :disabled=, :disabled
def disabled?
- disabled
+ !!disabled
end
def method_missing(method, *args, &block)
View
10 spec/bunyan_spec.rb
@@ -98,6 +98,16 @@
end
end
+describe Bunyan::Logger, "#disabled?" do
+ it "should return false if nothing is set" do
+ Bunyan::Logger.configure do |config|
+ config.database 'my_database'
+ config.collection 'my_collection'
+ end
+ Bunyan::Logger.disabled?.should == false
+ end
+end
+
describe 'the database getter' do
it 'should allow setting of the database' do
Bunyan::Logger.configure do |config|
Please sign in to comment.
Something went wrong with that request. Please try again.