Hello community,

here is the log from the commit of package rubygem-minitest for 
openSUSE:Factory checked in at 2015-06-10 09:15:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-minitest (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-minitest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-minitest"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-minitest/rubygem-minitest.changes        
2015-05-02 21:34:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-minitest.new/rubygem-minitest.changes   
2015-06-10 09:15:47.000000000 +0200
@@ -1,0 +2,25 @@
+Thu May 28 04:30:59 UTC 2015 - [email protected]
+
+- updated to version 5.7.0
+ see installed History.rdoc
+
+  === 5.7.0 / 2015-05-27
+  
+  * 1 major enhancement:
+  
+    * assert_raises now matches subclasses of the expected exception types. 
(jeremyevans)
+  
+  * 3 minor enhancements:
+  
+    * Added :block type for minitest/spec's #infect_an_assertion. (jeremyevans)
+    * Inline verification error messages in minitest/mock for GC performance. 
(zamith)
+    * assert_raises defaults to RuntimeError if not specified. (jeremyevans)
+  
+  * 4 bug fixes:
+  
+    * Added 'class' to minitest/mock's overridden_methods list. (zamith)
+    * Added file/line to infect_an_assertion's class_eval call. (jeremyevans)
+    * Cleared UnexpectedError's mesg w/ generic string.
+    * Fixed non-proc-oriented expectations when used on proc target. 
(jeremyevans)
+
+-------------------------------------------------------------------

Old:
----
  minitest-5.6.1.gem

New:
----
  minitest-5.7.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-minitest.spec ++++++
--- /var/tmp/diff_new_pack.o7NTYs/_old  2015-06-10 09:15:48.000000000 +0200
+++ /var/tmp/diff_new_pack.o7NTYs/_new  2015-06-10 09:15:48.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-minitest
-Version:        5.6.1
+Version:        5.7.0
 Release:        0
 %define mod_name minitest
 %define mod_full_name %{mod_name}-%{version}

++++++ minitest-5.6.1.gem -> minitest-5.7.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.rdoc new/History.rdoc
--- old/History.rdoc    2015-04-27 23:30:17.000000000 +0200
+++ new/History.rdoc    2015-05-27 23:42:53.000000000 +0200
@@ -1,3 +1,22 @@
+=== 5.7.0 / 2015-05-27
+
+* 1 major enhancement:
+
+  * assert_raises now matches subclasses of the expected exception types. 
(jeremyevans)
+
+* 3 minor enhancements:
+
+  * Added :block type for minitest/spec's #infect_an_assertion. (jeremyevans)
+  * Inline verification error messages in minitest/mock for GC performance. 
(zamith)
+  * assert_raises defaults to RuntimeError if not specified. (jeremyevans)
+
+* 4 bug fixes:
+
+  * Added 'class' to minitest/mock's overridden_methods list. (zamith)
+  * Added file/line to infect_an_assertion's class_eval call. (jeremyevans)
+  * Cleared UnexpectedError's mesg w/ generic string.
+  * Fixed non-proc-oriented expectations when used on proc target. 
(jeremyevans)
+
 === 5.6.1 / 2015-04-27
 
 * 2 bug fixes:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2015-04-27 23:30:17.000000000 +0200
+++ new/README.rdoc     2015-05-27 23:42:53.000000000 +0200
@@ -479,6 +479,7 @@
                                expectations.
 minitest-excludes           :: Clean API for excluding certain tests you
                                don't want to run under certain conditions.
+minitest-fail-fast          :: Reimplements RSpec's "fail fast" feature
 minitest-filecontent        :: Support unit tests with expectation results in 
files.
                                Differing results will be stored again in files.
 minitest-filesystem         :: Adds assertion and expectation to help testing
@@ -491,6 +492,7 @@
                                assertions and expectations.
 minitest-growl              :: Test notifier for minitest via growl.
 minitest-happy              :: GLOBALLY ACTIVATE MINITEST PRIDE! RAWR!
+minitest-hooks              :: Around and before_all/after_all/around_all hooks
 minitest-implicit-subject   :: Implicit declaration of the test subject.
 minitest-instrument         :: Instrument ActiveSupport::Notifications when
                                test method is executed.
@@ -512,6 +514,7 @@
 minitest-must_not           :: Provides must_not as an alias for wont in
                                Minitest.
 minitest-osx                :: Reporter for the Mac OS X notification center.
+minitest-parallel_fork      :: Fork-based parallelization
 minitest-parallel-db        :: Run tests in parallel with a single database.
 minitest-power_assert       :: PowerAssert for Minitest.
 minitest-predicates         :: Adds support for .predicate? methods.
@@ -524,6 +527,8 @@
 minitest-server             :: minitest-server provides a client/server setup 
                                with your minitest process, allowing your test 
                                run to send its results directly to a handler.
+minitest-shared_description :: Support for shared specs and shared spec
+                               subclasses
 minitest-should_syntax      :: RSpec-style +x.should == y+ assertions for
                                Minitest.
 minitest-shouldify          :: Adding all manner of shoulds to Minitest (bad
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/minitest/assertions.rb 
new/lib/minitest/assertions.rb
--- old/lib/minitest/assertions.rb      2015-04-27 23:30:17.000000000 +0200
+++ new/lib/minitest/assertions.rb      2015-05-27 23:42:53.000000000 +0200
@@ -287,9 +287,14 @@
     ##
     # Fails unless the block raises one of +exp+. Returns the
     # exception matched so you can check the message, attributes, etc.
+    #
+    # +exp+ takes an optional message on the end to help explain
+    # failures and defaults to StandardError if no exception class is
+    # passed.
 
     def assert_raises *exp
       msg = "#{exp.pop}.\n" if String === exp.last
+      exp << StandardError if exp.empty?
 
       begin
         yield
@@ -297,13 +302,7 @@
         return e if exp.include? Minitest::Skip
         raise e
       rescue Exception => e
-        expected = exp.any? { |ex|
-          if ex.instance_of? Module then
-            e.kind_of? ex
-          else
-            e.instance_of? ex
-          end
-        }
+        expected = exp.any? { |ex| e.kind_of? ex }
 
         assert expected, proc {
           exception_details(e, "#{msg}#{mu_pp(exp)} exception expected, not")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/minitest/expectations.rb 
new/lib/minitest/expectations.rb
--- old/lib/minitest/expectations.rb    2015-04-27 23:30:17.000000000 +0200
+++ new/lib/minitest/expectations.rb    2015-05-27 23:42:53.000000000 +0200
@@ -121,7 +121,7 @@
   #
   # :method: must_output
 
-  infect_an_assertion :assert_output, :must_output
+  infect_an_assertion :assert_output, :must_output, :block
 
   ##
   # See Minitest::Assertions#assert_raises
@@ -130,7 +130,7 @@
   #
   # :method: must_raise
 
-  infect_an_assertion :assert_raises, :must_raise
+  infect_an_assertion :assert_raises, :must_raise, :block
 
   ##
   # See Minitest::Assertions#assert_respond_to
@@ -157,7 +157,7 @@
   #
   # :method: must_be_silent
 
-  infect_an_assertion :assert_silent, :must_be_silent
+  infect_an_assertion :assert_silent, :must_be_silent, :block
 
   ##
   # See Minitest::Assertions#assert_throws
@@ -166,7 +166,7 @@
   #
   # :method: must_throw
 
-  infect_an_assertion :assert_throws, :must_throw
+  infect_an_assertion :assert_throws, :must_throw, :block
 
   ##
   # See Minitest::Assertions#refute_empty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/minitest/mock.rb new/lib/minitest/mock.rb
--- old/lib/minitest/mock.rb    2015-04-27 23:30:17.000000000 +0200
+++ new/lib/minitest/mock.rb    2015-05-27 23:42:53.000000000 +0200
@@ -12,6 +12,7 @@
 
     overridden_methods = %w[
       ===
+      class
       inspect
       instance_eval
       instance_variables
@@ -96,14 +97,11 @@
     def verify
       @expected_calls.each do |name, calls|
         calls.each do |expected|
-          msg1 = "expected #{__call name, expected}"
-          msg2 = "#{msg1}, got [#{__call name, @actual_calls[name]}]"
-
-          raise MockExpectationError, msg2 if
+          raise MockExpectationError, "expected #{__call name, expected}, got 
[#{__call name, @actual_calls[name]}]" if
             @actual_calls.key?(name) and
             not @actual_calls[name].include?(expected)
 
-          raise MockExpectationError, msg1 unless
+          raise MockExpectationError, "expected #{__call name, expected}" 
unless
             @actual_calls.key?(name) and
             @actual_calls[name].include?(expected)
         end
@@ -143,7 +141,8 @@
           [sym, expected_args.size, args.size]
       end
 
-      fully_matched = expected_args.zip(args).all? { |mod, a|
+      zipped_args = expected_args.zip(args)
+      fully_matched = zipped_args.all? { |mod, a|
         mod === a or mod == a
       }
 
@@ -154,7 +153,7 @@
 
       @actual_calls[sym] << {
         :retval => retval,
-        :args => expected_args.zip(args).map { |mod, a| mod === a ? mod : a },
+        :args => zipped_args.map! { |mod, a| mod === a ? mod : a },
       }
 
       retval
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/minitest/spec.rb new/lib/minitest/spec.rb
--- old/lib/minitest/spec.rb    2015-04-27 23:30:17.000000000 +0200
+++ new/lib/minitest/spec.rb    2015-05-27 23:42:53.000000000 +0200
@@ -2,8 +2,11 @@
 
 class Module # :nodoc:
   def infect_an_assertion meth, new_name, dont_flip = false # :nodoc:
+    block = dont_flip == :block
+    dont_flip = false if block
+
     # warn "%-22p -> %p %p" % [meth, new_name, dont_flip]
-    self.class_eval <<-EOM
+    self.class_eval <<-EOM, __FILE__, __LINE__ + 1
       def #{new_name} *args
         Minitest::Expectation.new(self, 
Minitest::Spec.current).#{new_name}(*args)
       end
@@ -14,7 +17,7 @@
         case
         when #{!!dont_flip} then
           ctx.#{meth}(target, *args)
-        when Proc === target then
+        when #{block} && Proc === target then
           ctx.#{meth}(*args, &target)
         else
           ctx.#{meth}(args.first, target, *args[1..-1])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/minitest.rb new/lib/minitest.rb
--- old/lib/minitest.rb 2015-04-27 23:30:17.000000000 +0200
+++ new/lib/minitest.rb 2015-05-27 23:42:53.000000000 +0200
@@ -7,7 +7,7 @@
 # :include: README.rdoc
 
 module Minitest
-  VERSION = "5.6.1" # :nodoc:
+  VERSION = "5.7.0" # :nodoc:
   ENCS = "".respond_to? :encoding # :nodoc:
 
   @@installed_at_exit ||= false
@@ -684,7 +684,7 @@
     attr_accessor :exception # :nodoc:
 
     def initialize exception # :nodoc:
-      super
+      super "Unexpected exception"
       self.exception = exception
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-04-27 23:30:17.000000000 +0200
+++ new/metadata        2015-05-27 23:42:53.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: minitest
 version: !ruby/object:Gem::Version
-  version: 5.6.1
+  version: 5.7.0
 platform: ruby
 authors:
 - Ryan Davis
@@ -29,7 +29,7 @@
   xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
   VpzF30vNaJK6ZT7xlIsIlwmH
   -----END CERTIFICATE-----
-date: 2015-04-27 00:00:00.000000000 Z
+date: 2015-05-27 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rdoc
Files old/metadata.gz.sig and new/metadata.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/minitest/test_minitest_mock.rb 
new/test/minitest/test_minitest_mock.rb
--- old/test/minitest/test_minitest_mock.rb     2015-04-27 23:30:17.000000000 
+0200
+++ new/test/minitest/test_minitest_mock.rb     2015-05-27 23:42:53.000000000 
+0200
@@ -19,7 +19,7 @@
   def test_blow_up_if_not_called
     @mock.foo
 
-    util_verify_bad "expected meaning_of_life() => 42, got []"
+    util_verify_bad "expected meaning_of_life() => 42"
   end
 
   def test_not_blow_up_if_everything_called
@@ -39,7 +39,7 @@
     @mock.meaning_of_life
     @mock.expect(:bar, true)
 
-    util_verify_bad "expected bar() => true, got []"
+    util_verify_bad "expected bar() => true"
   end
 
   def test_blow_up_on_wrong_number_of_arguments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/minitest/test_minitest_spec.rb 
new/test/minitest/test_minitest_spec.rb
--- old/test/minitest/test_minitest_spec.rb     2015-04-27 23:30:17.000000000 
+0200
+++ new/test/minitest/test_minitest_spec.rb     2015-05-27 23:42:53.000000000 
+0200
@@ -15,7 +15,7 @@
   # do not parallelize this suite... it just can"t handle it.
 
   def assert_triggered expected = "blah", klass = Minitest::Assertion
-    @assertion_count += 2
+    @assertion_count += 1
 
     e = assert_raises(klass) do
       yield
@@ -23,8 +23,22 @@
 
     msg = e.message.sub(/(---Backtrace---).*/m, '\1')
     msg.gsub!(/\(oid=[-0-9]+\)/, "(oid=N)")
-
-    assert_equal expected, msg
+    msg.gsub!(/@.+>/, "@PATH>")
+    msg.gsub!(/(\d\.\d{6})\d+/, '\1xxx') # normalize: ruby version, impl, 
platform
+    msg.gsub!(/:0x[a-fA-F0-9]{4,}/m, ":0xXXXXXX")
+
+    if expected
+      @assertion_count += 1
+      case expected
+      when String then
+        assert_equal expected, msg
+      when Regexp then
+        @assertion_count += 1
+        assert_match expected, msg
+      else
+        flunk "Unknown: #{expected.inspect}"
+      end
+    end
   end
 
   before do
@@ -182,6 +196,8 @@
   end
 
   it "needs to verify equality" do
+    @assertion_count += 1
+
     (6 * 7).must_equal(42).must_equal true
 
     assert_triggered "Expected: 42\n  Actual: 54" do
@@ -191,6 +207,10 @@
     assert_triggered "msg.\nExpected: 42\n  Actual: 54" do
       (6 * 9).must_equal 42, "msg"
     end
+
+    assert_triggered(/^-42\n\+#<Proc:0xXXXXXX@PATH>\n/) do
+      proc { 42 }.must_equal 42 # proc isn't called, so expectation fails
+    end
   end
 
   it "needs to verify floats outside a delta" do
@@ -282,7 +302,9 @@
   end
 
   it "needs to verify inequality" do
+    @assertion_count += 2
     42.wont_equal(6 * 9).must_equal false
+    proc{}.wont_equal(42).must_equal false
 
     assert_triggered "Expected 1 to not be equal to 1." do
       1.wont_equal 1
@@ -306,7 +328,10 @@
   end
 
   it "needs to verify kinds of a class" do
+    @assertion_count += 2
+
     42.wont_be_kind_of(String).must_equal false
+    proc{}.wont_be_kind_of(String).must_equal false
 
     assert_triggered "Expected 42 to not be a kind of Integer." do
       42.wont_be_kind_of Integer
@@ -318,7 +343,7 @@
   end
 
   it "needs to verify kinds of objects" do
-    @assertion_count += 2 # extra test
+    @assertion_count += 3 # extra test
 
     (6 * 7).must_be_kind_of(Fixnum).must_equal true
     (6 * 7).must_be_kind_of(Numeric).must_equal true
@@ -330,6 +355,11 @@
     assert_triggered "msg.\nExpected 42 to be a kind of String, not Fixnum." do
       (6 * 7).must_be_kind_of String, "msg"
     end
+
+    exp = "Expected #<Proc:0xXXXXXX@PATH> to be a kind of String, not Proc."
+    assert_triggered exp do
+      proc{}.must_be_kind_of String
+    end
   end
 
   it "needs to verify mismatch" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/minitest/test_minitest_unit.rb 
new/test/minitest/test_minitest_unit.rb
--- old/test/minitest/test_minitest_unit.rb     2015-04-27 23:30:17.000000000 
+0200
+++ new/test/minitest/test_minitest_unit.rb     2015-05-27 23:42:53.000000000 
+0200
@@ -4,6 +4,7 @@
 module MyModule; end
 class AnError < StandardError; include MyModule; end
 class ImmutableString < String; def inspect; super.freeze; end; end
+SomeError = Class.new Exception
 
 class TestMinitestUnit < MetaMetaMetaTestCase
   parallelize_me!
@@ -1141,6 +1142,34 @@
     end
   end
 
+  def test_assert_raises_default
+    @tc.assert_raises do
+      raise StandardError, "blah"
+    end
+  end
+
+  def test_assert_raises_default_triggered
+    e = assert_raises Minitest::Assertion do
+      @tc.assert_raises do
+        raise SomeError, "blah"
+      end
+    end
+
+    expected = clean <<-EOM.chomp
+      [StandardError] exception expected, not
+      Class: <SomeError>
+      Message: <\"blah\">
+      ---Backtrace---
+      FILE:LINE:in \`test_assert_raises_default_triggered\'
+      ---------------
+    EOM
+
+    actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
+    actual.gsub!(/block \(\d+ levels\) in /, "") if RUBY_VERSION >= "1.9.0"
+
+    assert_equal expected, actual
+  end
+
   def test_assert_raises_module
     @tc.assert_raises MyModule do
       raise AnError
@@ -1236,26 +1265,32 @@
     assert_equal expected, e.message
   end
 
-  def test_assert_raises_triggered_subclass
+  def test_assert_raises_subclass
+    @tc.assert_raises StandardError do
+      raise AnError
+    end
+  end
+
+  def test_assert_raises_subclass_triggered
     e = assert_raises Minitest::Assertion do
-      @tc.assert_raises StandardError do
-        raise AnError
+      @tc.assert_raises SomeError do
+        raise AnError, "some message"
       end
     end
 
-    expected = clean <<-EOM.chomp
-      [StandardError] exception expected, not
+    expected = clean <<-EOM
+      [SomeError] exception expected, not
       Class: <AnError>
-      Message: <\"AnError\">
+      Message: <\"some message\">
       ---Backtrace---
-      FILE:LINE:in \`test_assert_raises_triggered_subclass\'
+      FILE:LINE:in \`test_assert_raises_subclass_triggered\'
       ---------------
     EOM
 
     actual = e.message.gsub(/^.+:\d+/, "FILE:LINE")
     actual.gsub!(/block \(\d+ levels\) in /, "") if RUBY_VERSION >= "1.9.0"
 
-    assert_equal expected, actual
+    assert_equal expected.chomp, actual
   end
 
   def test_assert_respond_to


Reply via email to