pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/ruby-mocha Update ruby-mocha t 1.0.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/be857e8d8c08
branches:  trunk
changeset: 631906:be857e8d8c08
user:      taca <taca%pkgsrc.org@localhost>
date:      Fri Mar 14 16:11:22 2014 +0000

description:
Update ruby-mocha t 1.0.0.

# Release Notes

## 1.0.0

### External changes
* Assume 'mocha' has been required when requiring 'mocha/setup'.
* Provide shortcuts for integrating with specific test library i.e. `require 'mocha/test_unit'` or `require 'mocha/mini_test'`
as alternatives to `require 'mocha/setup'`.
* Do not automatically try to integrate with test libraries. Since the automatic test library integration functionality
requires the test library to be loaded and this doesn't usually happen until *after* the bundle is loaded, it makes things
simpler if we use `require 'mocha/setup'` to explicitly setup Mocha when we know the test library has been loaded. Fixes #146 & #155.
* Consider stubs on superclasses if none exist on primary receiver. Largely based on changes suggested by @ccutrer in #145.
Note: this may break existing tests which rely on the old behaviour. Stubbing a superclass method and then invoking that
method on a child class would previously cause an unexpected invocation error. By searching up through the inheritance
hierarchy for each of the delegate mock objects, we can provide more intuitive behaviour. Instead of an unexpected invocation
error, invoking the method on the child class will cause the stubbed method on the superclass to be used.
* Avoid recursion when constructing unexpected invocation message. Fixes #168.
* Add explanation of method dispatch. Heavily based on the relevant jMock v1 documentation. Fixes #172.
* Make class_eval line number more accurate. This sets the line number as the line number of the `def` statement. Closes #169.
* Allow nesting of `responds_with` parameter matcher. Closes #166.
* Define `Mocha` module before it's referenced. The test helper defines a class `TestCase` within the `Mocha` module. When
running the tests inside the bundle, the `Mocha` module happens to be defined at this point. However when running the tests outside the bundle, it is not defined and so an exception is raised: 
`uninitialized constant Mocha (NameError)`. Fixes #163.
* Document lack of thread-safety. Fixes #154.
* Document how to use the build-matrix script. Fixes #160.
* Stubbing non-public method should use same visibility. This will probably break some existing tests that were somehow relying
on the stubbed method being public while the original method was protected or private. Fixes #150.

### Internal changes
* Use lastest Rubygems in Travis CI builds.
* Run the standard test suite against Ruby 2.1.0 in the build matrix.
* Run integration tests against Ruby 2.0.0 with latest Test::Unit gem in the build matrix.
* Test::Unit is not available in Ruby v1.9.3 standard library, so remove it from the build matrix.
* Force use of Test::Unit runner, etc in relevant integration tests. Prior to this, I don't think we were really testing the
Mocha integration with Test::Unit much, because, although `TestUnitTest` was a subclass of `Test::Unit::TestCase`, the
important test case instances are the temporary ones built by `TestRunner#run_as_test` et al. Prior to this change, these
would only have used Test::Unit where MiniTest was not available *at all* i.e. only in early versions of Ruby and when the
MiniTest gem was not loaded.
* Reset environment variables between build matrix builds.
* Only activate integration with relevant test library for each of the integration tests.
* Include standard build combinations from Travis CI config i.e. builds using standard library versions of test libraries.
* Fix `build-matrix.rb` script. Also use `.travis.yml` to decide what combinations to run. This means we
can now simulate the Travis CI build locally and avoid duplication. Fixes #157.
* Remove Ruby version map from build matrix script. I'm using the `rbenv-aliases` plugin to alias minor versions to the
relevant patch version.

diffstat:

 devel/ruby-mocha/Makefile |   4 ++--
 devel/ruby-mocha/PLIST    |  13 +++++++++++--
 devel/ruby-mocha/distinfo |   8 ++++----
 3 files changed, 17 insertions(+), 8 deletions(-)

diffs (102 lines):

diff -r 202fcd3ca61a -r be857e8d8c08 devel/ruby-mocha/Makefile
--- a/devel/ruby-mocha/Makefile Fri Mar 14 16:10:29 2014 +0000
+++ b/devel/ruby-mocha/Makefile Fri Mar 14 16:11:22 2014 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.18 2013/06/16 16:17:41 taca Exp $
+# $NetBSD: Makefile,v 1.19 2014/03/14 16:11:22 taca Exp $
 
-DISTNAME=      mocha-0.14.0
+DISTNAME=      mocha-1.0.0
 CATEGORIES=    devel
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
diff -r 202fcd3ca61a -r be857e8d8c08 devel/ruby-mocha/PLIST
--- a/devel/ruby-mocha/PLIST    Fri Mar 14 16:10:29 2014 +0000
+++ b/devel/ruby-mocha/PLIST    Fri Mar 14 16:11:22 2014 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.16 2013/06/16 16:17:41 taca Exp $
+@comment $NetBSD: PLIST,v 1.17 2014/03/14 16:11:22 taca Exp $
 ${GEM_HOME}/cache/${GEM_NAME}.gem
 ${GEM_LIBDIR}/.gemtest
 ${GEM_LIBDIR}/.yardopts
@@ -8,7 +8,7 @@
 ${GEM_LIBDIR}/README.md
 ${GEM_LIBDIR}/RELEASE.md
 ${GEM_LIBDIR}/Rakefile
-${GEM_LIBDIR}/build-matrix.rb
+${GEM_LIBDIR}/bin/build-matrix
 ${GEM_LIBDIR}/gemfiles/Gemfile.minitest.1.3.0
 ${GEM_LIBDIR}/gemfiles/Gemfile.minitest.1.4.0
 ${GEM_LIBDIR}/gemfiles/Gemfile.minitest.1.4.1
@@ -37,6 +37,8 @@
 ${GEM_LIBDIR}/lib/mocha/configuration.rb
 ${GEM_LIBDIR}/lib/mocha/debug.rb
 ${GEM_LIBDIR}/lib/mocha/deprecation.rb
+${GEM_LIBDIR}/lib/mocha/detection/mini_test.rb
+${GEM_LIBDIR}/lib/mocha/detection/test_unit.rb
 ${GEM_LIBDIR}/lib/mocha/exception_raiser.rb
 ${GEM_LIBDIR}/lib/mocha/expectation.rb
 ${GEM_LIBDIR}/lib/mocha/expectation_error.rb
@@ -74,6 +76,7 @@
 ${GEM_LIBDIR}/lib/mocha/is_a.rb
 ${GEM_LIBDIR}/lib/mocha/logger.rb
 ${GEM_LIBDIR}/lib/mocha/method_matcher.rb
+${GEM_LIBDIR}/lib/mocha/mini_test.rb
 ${GEM_LIBDIR}/lib/mocha/mock.rb
 ${GEM_LIBDIR}/lib/mocha/mockery.rb
 ${GEM_LIBDIR}/lib/mocha/module_method.rb
@@ -106,6 +109,7 @@
 ${GEM_LIBDIR}/lib/mocha/parameter_matchers/yaml_equivalent.rb
 ${GEM_LIBDIR}/lib/mocha/parameters_matcher.rb
 ${GEM_LIBDIR}/lib/mocha/pretty_parameters.rb
+${GEM_LIBDIR}/lib/mocha/receivers.rb
 ${GEM_LIBDIR}/lib/mocha/return_values.rb
 ${GEM_LIBDIR}/lib/mocha/sequence.rb
 ${GEM_LIBDIR}/lib/mocha/setup.rb
@@ -114,6 +118,7 @@
 ${GEM_LIBDIR}/lib/mocha/standalone.rb
 ${GEM_LIBDIR}/lib/mocha/state_machine.rb
 ${GEM_LIBDIR}/lib/mocha/stubbing_error.rb
+${GEM_LIBDIR}/lib/mocha/test_unit.rb
 ${GEM_LIBDIR}/lib/mocha/thrower.rb
 ${GEM_LIBDIR}/lib/mocha/unexpected_invocation.rb
 ${GEM_LIBDIR}/lib/mocha/version.rb
@@ -143,6 +148,7 @@
 ${GEM_LIBDIR}/test/acceptance/return_value_test.rb
 ${GEM_LIBDIR}/test/acceptance/sequence_test.rb
 ${GEM_LIBDIR}/test/acceptance/states_test.rb
+${GEM_LIBDIR}/test/acceptance/stub_any_instance_method_defined_on_superclass_test.rb
 ${GEM_LIBDIR}/test/acceptance/stub_any_instance_method_test.rb
 ${GEM_LIBDIR}/test/acceptance/stub_class_method_defined_on_active_record_association_proxy_test.rb
 ${GEM_LIBDIR}/test/acceptance/stub_class_method_defined_on_class_test.rb
@@ -175,7 +181,9 @@
 ${GEM_LIBDIR}/test/acceptance/stubbing_on_non_mock_object_test.rb
 ${GEM_LIBDIR}/test/acceptance/stubbing_same_class_method_on_parent_and_child_classes_test.rb
 ${GEM_LIBDIR}/test/acceptance/throw_test.rb
+${GEM_LIBDIR}/test/acceptance/unexpected_invocation_test.rb
 ${GEM_LIBDIR}/test/acceptance/unstubbing_test.rb
+${GEM_LIBDIR}/test/assertions.rb
 ${GEM_LIBDIR}/test/deprecation_disabler.rb
 ${GEM_LIBDIR}/test/execution_point.rb
 ${GEM_LIBDIR}/test/integration/mini_test_test.rb
@@ -230,6 +238,7 @@
 ${GEM_LIBDIR}/test/unit/parameter_matchers/stub_matcher.rb
 ${GEM_LIBDIR}/test/unit/parameter_matchers/yaml_equivalent_test.rb
 ${GEM_LIBDIR}/test/unit/parameters_matcher_test.rb
+${GEM_LIBDIR}/test/unit/receivers_test.rb
 ${GEM_LIBDIR}/test/unit/return_values_test.rb
 ${GEM_LIBDIR}/test/unit/sequence_test.rb
 ${GEM_LIBDIR}/test/unit/single_return_value_test.rb
diff -r 202fcd3ca61a -r be857e8d8c08 devel/ruby-mocha/distinfo
--- a/devel/ruby-mocha/distinfo Fri Mar 14 16:10:29 2014 +0000
+++ b/devel/ruby-mocha/distinfo Fri Mar 14 16:11:22 2014 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.17 2013/06/16 16:17:41 taca Exp $
+$NetBSD: distinfo,v 1.18 2014/03/14 16:11:22 taca Exp $
 
-SHA1 (mocha-0.14.0.gem) = 0fe4d1b38844b4bd3e2ba8d138264ea7b3eaa0de
-RMD160 (mocha-0.14.0.gem) = 2357a8469b116715b2a3f235a6cdd85297d353b0
-Size (mocha-0.14.0.gem) = 82944 bytes
+SHA1 (mocha-1.0.0.gem) = c680c151394c61d2a1a1f7d9e1d1c8d190751d7a
+RMD160 (mocha-1.0.0.gem) = 7dbf1a025d3188b18532b7946c026bbebcb1c240
+Size (mocha-1.0.0.gem) = 87040 bytes



Home | Main Index | Thread Index | Old Index