spec/log_spec.rb in mblox-0.0.1 vs spec/log_spec.rb in mblox-0.0.2

- old
+ new

@@ -1,16 +1,8 @@ require "spec_helper" require "logger" -module Mblox - class << self - def reset_configuration - @config = Configuration.new - end - end -end - describe "logger" do before(:each) do Mblox.reset_configuration end @@ -29,10 +21,10 @@ expect { Mblox.log "Some debug info" }.to_not raise_error end it "should not allow log level news when the logger is created after log level is set" do Mblox.config.log_at :news - expect { Mblox.config.logger = ::Logger.new("STDOUT")}.to raise_error(ArgumentError, "Mblox log level must be set to :fatal, :error, :warn, :info or :debug") + expect { Mblox.config.logger = ::Logger.new(STDOUT)}.to raise_error(ArgumentError, "Mblox log level must be set to :fatal, :error, :warn, :info or :debug") expect { Mblox.log "Some news" }.to_not raise_error end it "should not allow log level news when the logger is created before log level is set and should remain in a valid state" do Mblox.config.logger = ::Logger.new("/dev/null")