From 0d2ccbccb321786cc29f7474bc32e0c0388fc000 Mon Sep 17 00:00:00 2001 From: Alexey Astafyev Date: Mon, 15 Jul 2013 13:06:38 +0400 Subject: [PATCH 1/3] The source :rugygems is deprecated, replaced with https://rubygems.org --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0a3bb9e..1257239 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source :rubygems +source 'https://rubygems.org' gemspec :name => "wrong" From bd78a63a223e1b1eeb4381293955ce0ac6e6c650 Mon Sep 17 00:00:00 2001 From: Alexey Astafyev Date: Thu, 25 Jul 2013 03:08:44 +0400 Subject: [PATCH 2/3] fixed assertions count for MiniTest::VERSION >= "5.0.6" --- lib/wrong/adapters/minitest.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/wrong/adapters/minitest.rb b/lib/wrong/adapters/minitest.rb index 9fae306..076d109 100644 --- a/lib/wrong/adapters/minitest.rb +++ b/lib/wrong/adapters/minitest.rb @@ -9,6 +9,11 @@ def failure_class MiniTest::Assertion end + if MiniTest::VERSION >= "5.0.6" + alias :_assertions :assertions + alias :"_assertions=" :"assertions=" + end + def aver(valence, explanation = nil, depth = 0) self._assertions += 1 # increment minitest's assert count super(valence, explanation, depth + 1) # apparently this passes along the default block From d0ddaa5f57eab94b558f7bb6032875ea0927c4b5 Mon Sep 17 00:00:00 2001 From: Alexey Astafyev Date: Thu, 25 Jul 2013 03:19:55 +0400 Subject: [PATCH 3/3] use 'alias_method' instead of 'alias' --- lib/wrong/adapters/minitest.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wrong/adapters/minitest.rb b/lib/wrong/adapters/minitest.rb index 076d109..48e30a3 100644 --- a/lib/wrong/adapters/minitest.rb +++ b/lib/wrong/adapters/minitest.rb @@ -10,8 +10,8 @@ def failure_class end if MiniTest::VERSION >= "5.0.6" - alias :_assertions :assertions - alias :"_assertions=" :"assertions=" + alias_method :_assertions, :assertions + alias_method :"_assertions=", :"assertions=" end def aver(valence, explanation = nil, depth = 0)