Permalink
Browse files

set default logger level to Logger::WARN

  • Loading branch information...
1 parent a1e540d commit e607cbf17efd7c21cf815e13f4adb192f6ac234d @youpy committed Jan 2, 2012
Showing with 9 additions and 3 deletions.
  1. +3 −1 lib/scissor.rb
  2. +6 −2 spec/scissor_spec.rb
View
@@ -17,7 +17,9 @@ def Scissor(filename_or_url = nil)
module Scissor
@logger = Logger.new(STDOUT)
- @logger.level = Logger::INFO
+ @logger.level = Logger::WARN
+
+ FFMPEG.logger = @logger
class << self
attr_accessor :logger
View
@@ -8,8 +8,6 @@
describe Scissor do
before do
- FFMPEG.logger.level = Logger::WARN
-
@mp3 = Scissor(fixture('sample.mp3'))
mkdir '/tmp/scissor-test'
@@ -20,6 +18,12 @@
rm_rf '/tmp/scissor-test'
end
+ it "should set default logger level to Logger::WARN" do
+ [Scissor, FFMPEG].each do |mod|
+ mod.logger.level.should eql(Logger::WARN)
+ end
+ end
+
it "should create from url" do
url = 'http://example.com/sample_mp3'
FakeWeb.register_uri(:get, url, :body => fixture('sample.mp3'), :content_type => 'audio/mpeg')

0 comments on commit e607cbf

Please sign in to comment.