diff --git a/.travis.yml b/.travis.yml index 2c92572..c2b38ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ rvm: - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1.0 - - 2.2.0 + - 2.1.8 + - 2.2.4 - 2.3.0 - - jruby-19mode + - jruby + diff --git a/Gemfile b/Gemfile index 03c98f2..dbee8d6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source "https://rubygems.org" group :development do - gem "shoulda", "~> 2.11.3" - gem "jeweler", "~> 1.8.7" - gem "mocha", "~> 0.14.0" + gem "shoulda", "~> 3.5.0" + gem "jeweler", "~> 2.0.1" + gem "mocha", "~> 1.1.0" gem "test-unit", "~> 3.0.8" end diff --git a/Gemfile.lock b/Gemfile.lock index 0a6c00f..f9fa938 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,61 +1,81 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.3.5) + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) builder (3.2.2) - faraday (0.8.8) - multipart-post (~> 1.2.0) - git (1.2.6) - github_api (0.10.1) - addressable - faraday (~> 0.8.1) - hashie (>= 1.2) - multi_json (~> 1.4) - nokogiri (~> 1.5.2) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + git (1.3.0) + github_api (0.13.1) + addressable (~> 2.4.0) + descendants_tracker (~> 0.0.4) + faraday (~> 0.8, < 0.10) + hashie (>= 3.4) + multi_json (>= 1.7.5, < 2.0) oauth2 - hashie (2.0.5) - highline (1.6.19) - httpauth (0.2.0) - jeweler (1.8.7) + hashie (3.4.3) + highline (1.7.8) + i18n (0.7.0) + jeweler (2.0.1) builder - bundler (~> 1.0) + bundler (>= 1.0) git (>= 1.2.5) - github_api (= 0.10.1) + github_api highline (>= 1.6.15) - nokogiri (= 1.5.10) + nokogiri (>= 1.5.10) rake rdoc - json (1.8.2) - jwt (0.1.8) - multi_json (>= 1.5) - metaclass (0.0.1) - mocha (0.14.0) + json (1.8.3) + jwt (1.5.1) + metaclass (0.0.4) + mini_portile2 (2.0.0) + minitest (5.8.4) + mocha (1.1.0) metaclass (~> 0.0.1) - multi_json (1.7.9) + multi_json (1.11.2) multi_xml (0.5.5) - multipart-post (1.2.0) - nokogiri (1.5.10) - oauth2 (0.9.2) - faraday (~> 0.8) - httpauth (~> 0.2) - jwt (~> 0.1.4) - multi_json (~> 1.0) + multipart-post (2.0.0) + nokogiri (1.6.7.2) + mini_portile2 (~> 2.0.0.rc2) + oauth2 (1.1.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0, < 1.5.2) + multi_json (~> 1.3) multi_xml (~> 0.5) - rack (~> 1.2) - power_assert (0.2.3) - rack (1.5.2) - rake (10.1.0) - rdoc (4.0.1) + rack (>= 1.2, < 3) + power_assert (0.2.7) + rack (1.6.4) + rake (11.1.1) + rdoc (4.2.2) json (~> 1.4) - shoulda (2.11.3) + shoulda (3.5.0) + shoulda-context (~> 1.0, >= 1.0.1) + shoulda-matchers (>= 1.4.1, < 3.0) + shoulda-context (1.2.1) + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) test-unit (3.0.9) power_assert + thread_safe (0.3.5) + tzinfo (1.2.2) + thread_safe (~> 0.1) PLATFORMS ruby DEPENDENCIES - jeweler (~> 1.8.7) - mocha (~> 0.14.0) - shoulda (~> 2.11.3) + jeweler (~> 2.0.1) + mocha (~> 1.1.0) + shoulda (~> 3.5.0) test-unit (~> 3.0.8) + +BUNDLED WITH + 1.11.2 diff --git a/test/helper.rb b/test/helper.rb index 13f879a..5a6271f 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,7 +1,7 @@ require 'rubygems' require 'test/unit' require 'shoulda' -require 'mocha' +require 'mocha/setup' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) diff --git a/test/test_notifier.rb b/test/test_notifier.rb index 06f0a5a..f416e84 100644 --- a/test/test_notifier.rb +++ b/test/test_notifier.rb @@ -52,14 +52,14 @@ class TestNotifier < Test::Unit::TestCase e.set_backtrace(caller) hash = @notifier.__send__(:extract_hash, e) assert_equal 'RuntimeError: message', hash['short_message'] - assert_match /Backtrace/, hash['full_message'] + assert_match(/Backtrace/, hash['full_message']) assert_equal GELF::ERROR, hash['level'] end should "work with exception without backtrace" do e = RuntimeError.new('message') hash = @notifier.__send__(:extract_hash, e) - assert_match /Backtrace is not available/, hash['full_message'] + assert_match(/Backtrace is not available/, hash['full_message']) end should "work with exception and hash" do @@ -108,7 +108,7 @@ class TestNotifier < Test::Unit::TestCase should "set file and line" do line = __LINE__ hash = @notifier.__send__(:extract_hash, { 'version' => '1.0', 'short_message' => 'message' }) - assert_match /test_notifier.rb/, hash['file'] + assert_match(/test_notifier.rb/, hash['file']) assert_equal line + 1, hash['line'] end