Hello community, here is the log from the commit of package rubygem-test-unit for openSUSE:Factory checked in at 2016-11-10 13:22:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-test-unit (Old) and /work/SRC/openSUSE:Factory/.rubygem-test-unit.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-test-unit" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-test-unit/rubygem-test-unit.changes 2016-08-26 23:16:30.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-test-unit.new/rubygem-test-unit.changes 2016-11-10 13:22:45.000000000 +0100 @@ -1,0 +2,45 @@ +Wed Nov 2 05:48:33 UTC 2016 - co...@suse.com + +- updated to version 3.2.2 + see installed news.md + + ## 3.2.3 - 2016-11-02 {#version-3-2-2} + + ### Improvements + + * Improved Travis CI configuration. + [GitHub#123][Patch by Ryunosuke SEATO] + + * Supported Java native exception. + [GitHub#126][Reported by Bob Saveland] + + ### Fixes + + * doc: Fixed markup. [GitHub#127][Patch by Tomohiro Hashidate] + + * Fixed a bug that `--location=LINE` may not detect a test when + fixtures are defined before any tests: + + 1 class MyTestCase < Test::Unit::TestCase + 2 setup do + 3 end + 4 + 5 test "xxx" do + 6 end + 7 end + + `--location=5` couldn't find the `xxx` test. + + [Reported by Ryota Sasabe] + + ### Thanks + + * Ryunosuke Sato + + * Tomohiro Hashidate + + * Bob Saveland + + * Ryota Sasabe + +------------------------------------------------------------------- Old: ---- test-unit-3.2.1.gem New: ---- test-unit-3.2.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-test-unit.spec ++++++ --- /var/tmp/diff_new_pack.ZabOFQ/_old 2016-11-10 13:22:46.000000000 +0100 +++ /var/tmp/diff_new_pack.ZabOFQ/_new 2016-11-10 13:22:46.000000000 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-test-unit -Version: 3.2.1 +Version: 3.2.2 Release: 0 %define mod_name test-unit %define mod_full_name %{mod_name}-%{version} @@ -40,7 +40,7 @@ Group: Development/Languages/Ruby %description -Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit +test-unit (Test::Unit) is unit testing framework for Ruby, based on xUnit principles. These were originally designed by Kent Beck, creator of extreme programming software development methodology, for Smalltalk's SUnit. It allows writing tests, checking results and automated testing in Ruby. ++++++ test-unit-3.2.1.gem -> test-unit-3.2.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2016-07-19 11:33:53.000000000 +0200 +++ new/README.md 2016-11-02 02:17:05.000000000 +0100 @@ -10,26 +10,26 @@ An xUnit family unit testing framework for Ruby. -Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit +test-unit (Test::Unit) is unit testing framework for Ruby, based on xUnit principles. These were originally designed by Kent Beck, creator of extreme programming software development methodology, for Smalltalk's SUnit. It allows writing tests, checking results and automated testing in Ruby. ## Features -* Test::Unit 1.2.3 is the original Test::Unit, taken +* test-unit 1.2.3 is the original test-unit, taken straight from the ruby distribution. It is being distributed as a gem to allow tool builders to use it as a stand-alone package. (The test framework in ruby is going to radically change very soon). * test-unit will be improved actively and may break - compatiblity with Test::Unit 1.2.3. (We will not hope it + compatiblity with test-unit 1.2.3. (We will not hope it if it isn't needed.) * Some features exist as separated gems like GUI test runner. (Tk, GTK+ and Fox) test-unit-full gem package - provides for installing all Test::Unit related gems + provides for installing all test-unit related gems easily. ## How To @@ -43,7 +43,7 @@ % sudo gem install test-unit </pre> -If you want to use full Test::Unit features: +If you want to use full test-unit features: <pre> % sudo gem install test-unit-full Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/doc/text/news.md new/doc/text/news.md --- old/doc/text/news.md 2016-07-19 11:33:53.000000000 +0200 +++ new/doc/text/news.md 2016-11-02 02:17:05.000000000 +0100 @@ -1,5 +1,44 @@ # News +## 3.2.3 - 2016-11-02 {#version-3-2-2} + +### Improvements + + * Improved Travis CI configuration. + [GitHub#123][Patch by Ryunosuke SEATO] + + * Supported Java native exception. + [GitHub#126][Reported by Bob Saveland] + +### Fixes + + * doc: Fixed markup. [GitHub#127][Patch by Tomohiro Hashidate] + + * Fixed a bug that `--location=LINE` may not detect a test when + fixtures are defined before any tests: + + 1 class MyTestCase < Test::Unit::TestCase + 2 setup do + 3 end + 4 + 5 test "xxx" do + 6 end + 7 end + + `--location=5` couldn't find the `xxx` test. + + [Reported by Ryota Sasabe] + +### Thanks + + * Ryunosuke Sato + + * Tomohiro Hashidate + + * Bob Saveland + + * Ryota Sasabe + ## 3.2.1 - 2016-07-19 {#version-3-2-1} ### Improvements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/assertions.rb new/lib/test/unit/assertions.rb --- old/lib/test/unit/assertions.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/lib/test/unit/assertions.rb 2016-11-02 02:17:05.000000000 +0100 @@ -2169,19 +2169,45 @@ expected_exceptions.each do |exception_type| if exception_type.instance_of?(Module) exception_modules << exception_type - elsif exception_type.is_a?(Exception) + elsif exception_object?(exception_type) exception_objects << exception_type - else - @test_case.__send__(:assert, - Exception >= exception_type, - "Should expect a class of exception, " + - "#{exception_type}") + elsif exception_class?(exception_type) exception_classes << exception_type + else + full_message = + @test_case.__send__(:build_message, + nil, + "<?> must be " + + "a subclass of Exception, " + + "an object of Exception subclasses " + + "or a Module", + exception_type) + @test_case.flunk(full_message) end end [exception_classes, exception_modules, exception_objects] end + def exception_object?(exception_type) + return true if exception_type.is_a?(Exception) + + if Object.const_defined?(:Java) + return true if exception_type.is_a?(Java::JavaLang::Throwable) + end + + false + end + + def exception_class?(exception_type) + return true if exception_type <= Exception + + if Object.const_defined?(:Java) + return true if exception_type <= Java::JavaLang::Throwable + end + + false + end + def expected_class?(actual_exception, equality) @expected_classes.any? do |expected_class| actual_exception.__send__(equality, expected_class) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/fixture.rb new/lib/test/unit/fixture.rb --- old/lib/test/unit/fixture.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/lib/test/unit/fixture.rb 2016-11-02 02:17:05.000000000 +0100 @@ -127,6 +127,9 @@ if method_name_or_callback.respond_to?(:call) callback = method_name_or_callback method_name = callback_method_name(callback) + @test_case.attribute(:source_location, + callback.source_location, + method_name) @test_case.__send__(:define_method, method_name, &callback) else method_name = method_name_or_callback diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/testcase.rb new/lib/test/unit/testcase.rb --- old/lib/test/unit/testcase.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/lib/test/unit/testcase.rb 2016-11-02 02:17:05.000000000 +0100 @@ -37,49 +37,51 @@ # You can run two hooks before/after a TestCase run. # # Example: - # class TestMyClass < Test::Unit::TestCase - # class << self - # def startup - # ... + # + # class TestMyClass < Test::Unit::TestCase + # class << self + # def startup + # ... + # end + # + # def shutdown + # ... + # end # end # - # def shutdown + # def setup # ... # end - # end - # - # def setup - # ... - # end # - # def cleanup - # ... - # end + # def cleanup + # ... + # end # - # def teardown - # ... - # end + # def teardown + # ... + # end # - # def test_my_method1 - # ... - # end + # def test_my_method1 + # ... + # end # - # def test_my_method2 - # ... + # def test_my_method2 + # ... + # end # end - # end # # Here is a call order: - # * startup - # * setup - # * test_my_method1 - # * cleanup - # * teardown - # * setup - # * test_my_method2 - # * cleanup - # * teardown - # * shutdown + # + # 1. startup + # 1. setup + # 1. test_my_method1 + # 1. cleanup + # 1. teardown + # 1. setup + # 1. test_my_method2 + # 1. cleanup + # 1. teardown + # 1. shutdown class TestCase include Attribute include Fixture diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/version.rb new/lib/test/unit/version.rb --- old/lib/test/unit/version.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/lib/test/unit/version.rb 2016-11-02 02:17:05.000000000 +0100 @@ -1,5 +1,5 @@ module Test module Unit - VERSION = '3.2.1' + VERSION = '3.2.2' end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-07-19 11:33:53.000000000 +0200 +++ new/metadata 2016-11-02 02:17:05.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: test-unit version: !ruby/object:Gem::Version - version: 3.2.1 + version: 3.2.2 platform: ruby authors: - Kouhei Sutou @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-07-19 00:00:00.000000000 Z +date: 2016-11-02 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: power_assert @@ -96,7 +96,7 @@ - !ruby/object:Gem::Version version: '0' description: | - Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit + test-unit (Test::Unit) is unit testing framework for Ruby, based on xUnit principles. These were originally designed by Kent Beck, creator of extreme programming software development methodology, for Smalltalk's SUnit. It allows writing tests, checking results and automated testing in Ruby. @@ -274,4 +274,3 @@ - test/test-notification.rb - test/test-omission.rb - test/test-test-case.rb -has_rdoc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-assertions.rb new/test/test-assertions.rb --- old/test/test-assertions.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/test/test-assertions.rb 2016-11-02 02:17:05.000000000 +0100 @@ -513,8 +513,7 @@ end message = <<-EOM -Should expect a class of exception, Object. -<false> is not true. +<Object> must be a subclass of Exception, an object of Exception subclasses or a Module. EOM check_fail(message.chomp) do assert_nothing_raised(Object) do @@ -639,6 +638,21 @@ end end + def test_assert_raise_jruby + omit("For JRuby") unless Object.const_defined?(:Java) + + exception = Java::JavaLang::StringIndexOutOfBoundsException + + return_value = nil + check_nothing_fails(true) do + return_value = assert_raise(exception) do + Java::JavaLang::String.new("abc").char_at(4) + end + end + check(return_value.instance_of?(exception), + "Should have returned #{exception} but was #{return_value.class}") + end + def test_assert_instance_of check_nothing_fails { assert_instance_of(String, "string") @@ -838,7 +852,10 @@ rescue ZeroDivisionError end } - check_fail("Should expect a class of exception, Object.\n<false> is not true.") { + expected_message = + "<Object> must be a subclass of Exception, " + + "an object of Exception subclasses or a Module." + check_fail(expected_message) { assert_nothing_raised(Object) { 1 + 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-test-case.rb new/test/test-test-case.rb --- old/test/test-test-case.rb 2016-07-19 11:33:53.000000000 +0200 +++ new/test/test-test-case.rb 2016-11-02 02:17:05.000000000 +0100 @@ -752,6 +752,21 @@ child_test_case.test_defined?(:line => line_child), ]) end + + def test_with_setup + line = nil + test_case = Class.new(TestCase) do + setup do + end + + line = __LINE__; test "with setup" do + end + end + assert do + test_case.test_defined?(:line => line, + :method_name => "test: with setup") + end + end end end