[DRE-commits] [ruby-yell] 01/01: Imported Upstream version 2.0.6

Michael Crusoe misterc-guest at moszumanska.debian.org
Sat May 14 18:07:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

misterc-guest pushed a commit to annotated tag upstream/2.0.6
in repository ruby-yell.

commit a34f0725dc18f1d1c00d2fde8557006b7faaedf4
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date:   Sat May 14 10:48:06 2016 -0700

    Imported Upstream version 2.0.6
---
 Gemfile                             |   5 +-
 README.md                           |   3 +-
 lib/yell/event.rb                   |   2 +
 lib/yell/version.rb                 |   2 +-
 metadata.yml                        | 130 ---------------------------------
 spec/spec_helper.rb                 |   1 +
 spec/threaded/yell_spec.rb          |   6 +-
 spec/yell/adapters/datefile_spec.rb |  14 ++--
 spec/yell/dsl_spec.rb               |  10 +--
 spec/yell/level_spec.rb             | 140 ++++++++++++++++++------------------
 spec/yell/repository_spec.rb        |  26 ++++---
 spec/yell_spec.rb                   |  30 +++++---
 12 files changed, 133 insertions(+), 236 deletions(-)

diff --git a/Gemfile b/Gemfile
index 0f588d4..16a9656 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,8 +6,9 @@ gemspec
 group :development, :test do
   gem "rake"
 
-  gem 'rspec-core', '~> 2'
-  gem 'rspec-expectations', '~> 2'
+  gem 'rspec-core', '~> 3'
+  gem 'rspec-expectations', '~> 3'
+  gem 'rspec-its'
   gem "rr"
 
   if RUBY_VERSION < "1.9"
diff --git a/README.md b/README.md
index 602e0ee..a6ecd07 100644
--- a/README.md
+++ b/README.md
@@ -203,6 +203,7 @@ logger.debug 'Served asset /logo.png - 304 Not Modified (0ms)'
 
 ### Additional Adapters
 [Syslog](https://github.com/rudionrails/yell/wiki/additional-adapters-syslog)  
+[syslog-sd](https://github.com/raymond-wells/yell-adapters-syslogsd)  
 [Graylog2 (GELF)](https://github.com/rudionrails/yell/wiki/additional-adapters-gelf)  
 [Fluentd](https://github.com/red5studios/yell-adapters-fluentd)  
 
@@ -215,5 +216,5 @@ You can find further examples and additional adapters in the [wiki](https://gith
 or have a look into the examples folder.
 
 
-Copyright © 2011-2014 Rudolf Schmidt, released under the MIT license
+Copyright © 2011-2015 Rudolf Schmidt, released under the MIT license
 
diff --git a/lib/yell/event.rb b/lib/yell/event.rb
index 48c6f26..8b99856 100644
--- a/lib/yell/event.rb
+++ b/lib/yell/event.rb
@@ -16,6 +16,8 @@ module Yell #:nodoc:
 
 
     class Options
+      include Comparable
+
       attr_reader :severity
       attr_reader :caller_offset
 
diff --git a/lib/yell/version.rb b/lib/yell/version.rb
index 3bdbd3d..481fb5d 100644
--- a/lib/yell/version.rb
+++ b/lib/yell/version.rb
@@ -1,7 +1,7 @@
 # encoding: utf-8
 
 module Yell #:nodoc:
-  VERSION = "2.0.5"
+  VERSION = "2.0.6"
 
 end
 
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index cffbf32..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,130 +0,0 @@
---- !ruby/object:Gem::Specification
-name: yell
-version: !ruby/object:Gem::Version
-  version: 2.0.5
-platform: ruby
-authors:
-- Rudolf Schmidt
-autorequire: 
-bindir: bin
-cert_chain: []
-date: 2014-10-14 00:00:00.000000000 Z
-dependencies: []
-description: Yell - Your Extensible Logging Library. Define multiple adapters, various
-  log level combinations or message formatting options like you've never done before
-email: 
-executables: []
-extensions: []
-extra_rdoc_files: []
-files:
-- ".gitignore"
-- ".travis.yml"
-- Gemfile
-- LICENSE.txt
-- README.md
-- Rakefile
-- examples/001-basic-usage.rb
-- examples/002.1-log-level-basics.rb
-- examples/002.2-log-level-on-certain-severities-only.rb
-- examples/002.3-log-level-within-range.rb
-- examples/003.1-formatting-DefaultFormat.rb
-- examples/003.2-formatting-BasicFormat.rb
-- examples/003.3-formatting-ExtendedFormat.rb
-- examples/003.4-formatting-on-your-own.rb
-- examples/004.1-colorizing-the-log-output.rb
-- examples/005.1-repository.rb
-- examples/006.1-the-loggable-module.rb
-- examples/006.2-the-loggable-module-with-inheritance.rb
-- lib/core_ext/logger.rb
-- lib/yell.rb
-- lib/yell/adapters.rb
-- lib/yell/adapters/base.rb
-- lib/yell/adapters/datefile.rb
-- lib/yell/adapters/file.rb
-- lib/yell/adapters/io.rb
-- lib/yell/adapters/streams.rb
-- lib/yell/configuration.rb
-- lib/yell/event.rb
-- lib/yell/formatter.rb
-- lib/yell/helpers/adapter.rb
-- lib/yell/helpers/base.rb
-- lib/yell/helpers/formatter.rb
-- lib/yell/helpers/level.rb
-- lib/yell/helpers/silencer.rb
-- lib/yell/helpers/tracer.rb
-- lib/yell/level.rb
-- lib/yell/loggable.rb
-- lib/yell/logger.rb
-- lib/yell/repository.rb
-- lib/yell/silencer.rb
-- lib/yell/version.rb
-- spec/compatibility/activesupport_logger_spec.rb
-- spec/compatibility/formatter_spec.rb
-- spec/compatibility/level_spec.rb
-- spec/fixtures/yell.yml
-- spec/spec_helper.rb
-- spec/threaded/yell_spec.rb
-- spec/yell/adapters/base_spec.rb
-- spec/yell/adapters/datefile_spec.rb
-- spec/yell/adapters/file_spec.rb
-- spec/yell/adapters/io_spec.rb
-- spec/yell/adapters/streams_spec.rb
-- spec/yell/adapters_spec.rb
-- spec/yell/configuration_spec.rb
-- spec/yell/dsl_spec.rb
-- spec/yell/event_spec.rb
-- spec/yell/formatter_spec.rb
-- spec/yell/level_spec.rb
-- spec/yell/loggable_spec.rb
-- spec/yell/logger_spec.rb
-- spec/yell/repository_spec.rb
-- spec/yell/silencer_spec.rb
-- spec/yell_spec.rb
-- yell.gemspec
-homepage: http://rudionrailspec.github.com/yell
-licenses:
-- MIT
-metadata: {}
-post_install_message: 
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-required_rubygems_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-requirements: []
-rubyforge_project: yell
-rubygems_version: 2.2.2
-signing_key: 
-specification_version: 4
-summary: Yell - Your Extensible Logging Library
-test_files:
-- spec/compatibility/activesupport_logger_spec.rb
-- spec/compatibility/formatter_spec.rb
-- spec/compatibility/level_spec.rb
-- spec/fixtures/yell.yml
-- spec/spec_helper.rb
-- spec/threaded/yell_spec.rb
-- spec/yell/adapters/base_spec.rb
-- spec/yell/adapters/datefile_spec.rb
-- spec/yell/adapters/file_spec.rb
-- spec/yell/adapters/io_spec.rb
-- spec/yell/adapters/streams_spec.rb
-- spec/yell/adapters_spec.rb
-- spec/yell/configuration_spec.rb
-- spec/yell/dsl_spec.rb
-- spec/yell/event_spec.rb
-- spec/yell/formatter_spec.rb
-- spec/yell/level_spec.rb
-- spec/yell/loggable_spec.rb
-- spec/yell/logger_spec.rb
-- spec/yell/repository_spec.rb
-- spec/yell/silencer_spec.rb
-- spec/yell_spec.rb
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 7681f88..d1e21e8 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,6 +5,7 @@ ENV['YELL_ENV'] = 'test'
 
 require 'rspec/core'
 require 'rspec/expectations'
+require 'rspec/its'
 require 'rr'
 require 'timecop'
 
diff --git a/spec/threaded/yell_spec.rb b/spec/threaded/yell_spec.rb
index 1e1d6d8..bb886cc 100644
--- a/spec/threaded/yell_spec.rb
+++ b/spec/threaded/yell_spec.rb
@@ -19,7 +19,7 @@ describe "running Yell multi-threaded" do
     end
 
     it "should write all messages" do
-      lines.should == 10*threads
+      expect(lines).to eq(10*threads)
     end
   end
 
@@ -51,7 +51,7 @@ describe "running Yell multi-threaded" do
         Thread.new { 10.times { Yell['threaded'].info count } }
       end.each(&:join)
 
-      lines.should == 10*threads
+      expect(lines).to eq(10*threads)
     end
   end
 
@@ -83,7 +83,7 @@ describe "running Yell multi-threaded" do
         sleep 0.3
 
         files = Dir[ fixture_path + '/*.*.log' ]
-        files.size.should == 2
+        expect(files.size).to eq(2)
 
         # files.last.should match( datefile_pattern_for(Time.now) ) # today
         # files.first.should match( datefile_pattern_for(Time.now-86400) ) # yesterday
diff --git a/spec/yell/adapters/datefile_spec.rb b/spec/yell/adapters/datefile_spec.rb
index e1d30d7..51480bb 100644
--- a/spec/yell/adapters/datefile_spec.rb
+++ b/spec/yell/adapters/datefile_spec.rb
@@ -28,7 +28,7 @@ describe Yell::Adapters::Datefile do
     end
 
     it "should be output to filename with date pattern" do
-      expect(File.exist?(today_filename)).to be_true
+      expect(File.exist?(today_filename)).to be_truthy
 
       expect(today_lines.size).to eq(2) # includes header line
       expect(today_lines.last).to match(message)
@@ -37,7 +37,7 @@ describe Yell::Adapters::Datefile do
     it "should output to the same file" do
       adapter.write(event)
 
-      expect(File.exist?(today_filename)).to be_true
+      expect(File.exist?(today_filename)).to be_truthy
       expect(today_lines.size).to eq(3) # includes header line
     end
 
@@ -55,7 +55,7 @@ describe Yell::Adapters::Datefile do
       end
 
       it "should rotate file" do
-        expect(File.exist?(tomorrow_filename)).to be_true
+        expect(File.exist?(tomorrow_filename)).to be_truthy
 
         expect(tomorrow_lines.size).to eq(2) # includes header line
         expect(tomorrow_lines.last).to match(message)
@@ -89,14 +89,14 @@ describe Yell::Adapters::Datefile do
       end
 
       it "should be created on the original filename" do
-        expect(File.symlink?(filename)).to be_true
+        expect(File.symlink?(filename)).to be_truthy
         expect(File.readlink(filename)).to eq(today_filename)
       end
 
       it "should be recreated upon rollover" do
         Timecop.freeze(tomorrow) { adapter.write(event) }
 
-        expect(File.symlink?(filename)).to be_true
+        expect(File.symlink?(filename)).to be_truthy
         expect(File.readlink(filename)).to eq(tomorrow_filename)
       end
     end
@@ -109,7 +109,7 @@ describe Yell::Adapters::Datefile do
       it "should not create the sylink the original filename" do
         adapter.write( event )
 
-        expect(File.symlink?(filename)).to be_false
+        expect(File.symlink?(filename)).to be_falsey
       end
     end
   end
@@ -129,7 +129,7 @@ describe Yell::Adapters::Datefile do
       it "should be rewritten upon rollover" do
         Timecop.freeze(tomorrow) { adapter.write(event) }
 
-        expect(File.symlink?(filename)).to be_true
+        expect(File.symlink?(filename)).to be_truthy
         expect(File.readlink(filename)).to eq(tomorrow_filename)
       end
     end
diff --git a/spec/yell/dsl_spec.rb b/spec/yell/dsl_spec.rb
index 44f3396..3c38829 100644
--- a/spec/yell/dsl_spec.rb
+++ b/spec/yell/dsl_spec.rb
@@ -23,7 +23,7 @@ describe "Yell Adapter DSL spec" do
 
   it "should perform #setup" do
     adapter = DSLAdapter.new
-    expect(adapter.test_setup?).to be_true
+    expect(adapter.test_setup?).to be_truthy
   end
 
   it "should perform #write" do
@@ -31,18 +31,18 @@ describe "Yell Adapter DSL spec" do
     stub(event).level { 0 }
 
     adapter = DSLAdapter.new
-    expect(adapter.test_write?).to be_false
+    expect(adapter.test_write?).to be_falsey
 
     adapter.write(event)
-    expect(adapter.test_write?).to be_true
+    expect(adapter.test_write?).to be_truthy
   end
 
   it "should perform #close" do
     adapter = DSLAdapter.new
-    expect(adapter.test_close?).to be_false
+    expect(adapter.test_close?).to be_falsey
 
     adapter.close
-    expect(adapter.test_close?).to be_true
+    expect(adapter.test_close?).to be_truthy
   end
 
 end
diff --git a/spec/yell/level_spec.rb b/spec/yell/level_spec.rb
index 03f3a06..03ce696 100644
--- a/spec/yell/level_spec.rb
+++ b/spec/yell/level_spec.rb
@@ -6,11 +6,11 @@ describe Yell::Level do
     let(:level) { Yell::Level.new }
 
     it "should should return correctly" do
-      expect(level.at?(:debug)).to be_true
-      expect(level.at?(:info)).to be_true
-      expect(level.at?(:warn)).to be_true
-      expect(level.at?(:error)).to be_true
-      expect(level.at?(:fatal)).to be_true
+      expect(level.at?(:debug)).to be_truthy
+      expect(level.at?(:info)).to be_truthy
+      expect(level.at?(:warn)).to be_truthy
+      expect(level.at?(:error)).to be_truthy
+      expect(level.at?(:fatal)).to be_truthy
     end
   end
 
@@ -21,11 +21,11 @@ describe Yell::Level do
       let(:severity) { :debug }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_true
-        expect(level.at?(:info)).to be_true
-        expect(level.at?(:warn)).to be_true
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_truthy
+        expect(level.at?(:info)).to be_truthy
+        expect(level.at?(:warn)).to be_truthy
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
 
@@ -33,11 +33,11 @@ describe Yell::Level do
       let(:severity) { :info }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_true
-        expect(level.at?(:warn)).to be_true
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_truthy
+        expect(level.at?(:warn)).to be_truthy
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
 
@@ -45,11 +45,11 @@ describe Yell::Level do
       let(:severity) { :warn }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_true
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_truthy
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
 
@@ -57,11 +57,11 @@ describe Yell::Level do
       let(:severity) { :error }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_false
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_falsey
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
 
@@ -69,11 +69,11 @@ describe Yell::Level do
       let(:severity) { :fatal }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_false
-        expect(level.at?(:error)).to be_false
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_falsey
+        expect(level.at?(:error)).to be_falsey
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
   end
@@ -85,11 +85,11 @@ describe Yell::Level do
       let(:severity) { 'error' }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_false
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_falsey
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
 
@@ -97,11 +97,11 @@ describe Yell::Level do
       let(:severity) { 'gte.info lte.error' }
 
       it "should should return correctly" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_true
-        expect(level.at?(:warn)).to be_true
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_false
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_truthy
+        expect(level.at?(:warn)).to be_truthy
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_falsey
       end
     end
 
@@ -109,11 +109,11 @@ describe Yell::Level do
       let(:severity) { 'gt.info lt.error' }
 
       it "should be valid" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_true
-        expect(level.at?(:error)).to be_false
-        expect(level.at?(:fatal)).to be_false
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_truthy
+        expect(level.at?(:error)).to be_falsey
+        expect(level.at?(:fatal)).to be_falsey
       end
     end
 
@@ -121,11 +121,11 @@ describe Yell::Level do
       let(:severity) { 'at.info at.error' }
 
       it "should be valid" do
-        expect(level.at?(:debug)).to be_false
-        expect(level.at?(:info)).to be_true
-        expect(level.at?(:warn)).to be_false
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_false
+        expect(level.at?(:debug)).to be_falsey
+        expect(level.at?(:info)).to be_truthy
+        expect(level.at?(:warn)).to be_falsey
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_falsey
       end
     end
 
@@ -133,11 +133,11 @@ describe Yell::Level do
       let(:severity) { 'gte.error at.debug' }
 
       it "should be valid" do
-        expect(level.at?(:debug)).to be_true
-        expect(level.at?(:info)).to be_false
-        expect(level.at?(:warn)).to be_false
-        expect(level.at?(:error)).to be_true
-        expect(level.at?(:fatal)).to be_true
+        expect(level.at?(:debug)).to be_truthy
+        expect(level.at?(:info)).to be_falsey
+        expect(level.at?(:warn)).to be_falsey
+        expect(level.at?(:error)).to be_truthy
+        expect(level.at?(:fatal)).to be_truthy
       end
     end
   end
@@ -146,11 +146,11 @@ describe Yell::Level do
     let(:level) { Yell::Level.new( [:debug, :warn, :fatal] ) }
 
     it "should return correctly" do
-      expect(level.at?(:debug)).to be_true
-      expect(level.at?(:info)).to be_false
-      expect(level.at?(:warn)).to be_true
-      expect(level.at?(:error)).to be_false
-      expect(level.at?(:fatal)).to be_true
+      expect(level.at?(:debug)).to be_truthy
+      expect(level.at?(:info)).to be_falsey
+      expect(level.at?(:warn)).to be_truthy
+      expect(level.at?(:error)).to be_falsey
+      expect(level.at?(:fatal)).to be_truthy
     end
   end
 
@@ -158,11 +158,11 @@ describe Yell::Level do
     let(:level) { Yell::Level.new( (1..3) ) }
 
     it "should return correctly" do
-      expect(level.at?(:debug)).to be_false
-      expect(level.at?(:info)).to be_true
-      expect(level.at?(:warn)).to be_true
-      expect(level.at?(:error)).to be_true
-      expect(level.at?(:fatal)).to be_false
+      expect(level.at?(:debug)).to be_falsey
+      expect(level.at?(:info)).to be_truthy
+      expect(level.at?(:warn)).to be_truthy
+      expect(level.at?(:error)).to be_truthy
+      expect(level.at?(:fatal)).to be_falsey
     end
   end
 
@@ -170,11 +170,11 @@ describe Yell::Level do
     let(:level) { Yell::Level.new(:warn) }
 
     it "should return correctly" do
-      expect(level.at?(:debug)).to be_false
-      expect(level.at?(:info)).to be_false
-      expect(level.at?(:warn)).to be_true
-      expect(level.at?(:error)).to be_true
-      expect(level.at?(:fatal)).to be_true
+      expect(level.at?(:debug)).to be_falsey
+      expect(level.at?(:info)).to be_falsey
+      expect(level.at?(:warn)).to be_truthy
+      expect(level.at?(:error)).to be_truthy
+      expect(level.at?(:fatal)).to be_truthy
     end
   end
 
diff --git a/spec/yell/repository_spec.rb b/spec/yell/repository_spec.rb
index 818524b..ef004bc 100644
--- a/spec/yell/repository_spec.rb
+++ b/spec/yell/repository_spec.rb
@@ -14,7 +14,9 @@ describe Yell::Repository do
     context "when logger with :name exists" do
       let!(:logger) { Yell.new(:stdout, :name => name) }
 
-      it { should eq(logger) }
+      it "should eq(logger)" do
+        expect(subject).to eq(logger)
+      end
     end
 
     context "given a Class" do
@@ -22,29 +24,33 @@ describe Yell::Repository do
 
       it "should raise with the correct :name when logger not found" do
         mock.proxy(Yell::LoggerNotFound).new(String)
-        lambda { Yell::Repository[String] }.should raise_error(Yell::LoggerNotFound)
+        expect{ Yell::Repository[String] }.to raise_error(Yell::LoggerNotFound)
       end
 
       it "should return the logger" do
-        Yell::Repository[Numeric].should eq(logger)
+        expect(Yell::Repository[Numeric]).to eq(logger)
       end
 
       it "should return the logger when superclass has it defined" do
-        Yell::Repository[Integer].should eq(logger)
+        expect(Yell::Repository[Integer]).to eq(logger)
       end
     end
   end
 
   context ".[]=" do
     before { Yell::Repository[name] = logger }
-    it { should eq(logger) }
+    it "should eq(logger)" do
+      expect(subject).to eq(logger)
+    end
   end
 
   context ".[]= with a named logger" do
     let!(:logger) { Yell.new(:stdout, :name => name) }
     before { Yell::Repository[name] = logger }
 
-    it { should eq(logger) }
+    it "should eq(logger)" do
+      expect(subject).to eq(logger)
+    end
   end
 
   context ".[]= with a named logger of a different name" do
@@ -53,8 +59,8 @@ describe Yell::Repository do
     before { Yell::Repository[name] = logger }
 
     it "should add logger to both repositories" do
-      Yell::Repository[name].should eq(logger)
-      Yell::Repository[other].should eq(logger)
+      expect(Yell::Repository[name]).to eq(logger)
+      expect(Yell::Repository[other]).to eq(logger)
     end
   end
 
@@ -63,7 +69,9 @@ describe Yell::Repository do
     subject { Yell::Repository.loggers }
     before { Yell::Repository[name] = logger }
 
-    it { should eq(loggers) }
+    it "should eq(loggers)" do
+      expect(subject).to eq(loggers)
+    end
   end
 
 end
diff --git a/spec/yell_spec.rb b/spec/yell_spec.rb
index 370ebf3..64f4788 100644
--- a/spec/yell_spec.rb
+++ b/spec/yell_spec.rb
@@ -5,7 +5,9 @@ describe Yell do
 
   subject { logger }
 
-  it { should be_kind_of Yell::Logger }
+  it "should be_kind_of Yell::Logger" do
+    expect(subject).to be_a_kind_of(Yell::Logger)
+  end
 
   it "should raise AdapterNotFound when adapter cant be loaded" do
     expect {
@@ -15,12 +17,16 @@ describe Yell do
 
   context ".level" do
     subject { Yell.level }
-    it { should be_kind_of Yell::Level }
+    it "should be_kind_of Yell::Level" do
+      expect(subject).to be_a_kind_of(Yell::Level)
+    end
   end
 
   context ".format" do
     subject { Yell.format( "%m" ) }
-    it { should be_kind_of Yell::Formatter }
+    it "should be_kind_of Yell::Formatter" do
+      expect(subject).to be_a_kind_of(Yell::Formatter)
+    end
   end
 
   context ".load!" do
@@ -30,7 +36,9 @@ describe Yell do
       mock(Yell::Configuration).load!('yell.yml') { {} }
     end
 
-    it { should be_kind_of Yell::Logger }
+    it "should be_kind_of Yell::Logger" do
+      expect(subject).to be_a_kind_of(Yell::Logger)
+    end
   end
 
   context ".[]" do
@@ -57,7 +65,7 @@ describe Yell do
     subject { Yell.env }
 
     it "should default to YELL_ENV" do
-      subject.should == 'test'
+      expect(subject).to eq('test')
     end
 
     context "fallback to RACK_ENV" do
@@ -70,7 +78,9 @@ describe Yell do
 
       after { ENV.delete 'RACK_ENV' }
 
-      it { should == 'rack' }
+      it "should == 'rack'" do
+        expect(subject).to eq('rack')
+      end
     end
 
     context "fallback to RAILS_ENV" do
@@ -84,7 +94,9 @@ describe Yell do
 
       after { ENV.delete 'RAILS_ENV' }
 
-      it { should == 'rails' }
+      it "should == 'rails'" do
+        expect(subject).to eq('rails')
+      end
     end
 
     context "fallback to development" do
@@ -94,7 +106,9 @@ describe Yell do
         stub(ENV).key?('RAILS_ENV') { false }
       end
 
-      it { should == 'development' }
+      it "should == 'development'" do
+        expect(subject).to eq('development')
+      end
     end
   end
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-yell.git



More information about the Pkg-ruby-extras-commits mailing list