./devel/ruby-mocha, Ruby library for mocking and stubbing

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 1.5.0, Package name: ruby24-mocha-1.5.0, Maintainer: pkgsrc-users

Mocha is a Ruby library for mocking and stubbing using a syntax
like that of JMock, and SchMock. Most commonly Mocha is used in
conjunction with Test::Unit, but it can be used in other contexts.

One of its main advantages is that it allows you to mock and stub
methods on real (non-mock) classes and instances. You can for
example stub ActiveRecord instance methods like create, save,
destroy and even class methods like find to avoid hitting the
database in unit tests.

Mocha provides a unified, simple and readable syntax for both
traditional mocking and for mocking with real objects.


Required to run:
[devel/ruby-metaclass] [lang/ruby24-base]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 91e5df3e6a4a78a573bb75a6802f788b803ffe08
RMD160: 49055342394e2f3e4dc02f5f27395b1f441820a7
Filesize: 91 KB

Version history: (Expand)


CVS history: (Expand)


   2018-05-06 03:56:35 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-mocha: update to 1.5.0

## 1.5.0

* Prevent use of Mocha outside the context of a test/example - thanks to @andyw8 \ 
& @lzap (#327)
   2018-03-23 14:57:53 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-mocha: update to 1.4.0

1.4.0 (2018/03/20)

* Fix deprecation warning for assert_nil in ClassMethodTest (#308 & #309)
* Display file and line number in deprecation warning - thanks to @chrisarcand
  (#310, #312 & #313)
* Rename mocha/mini_test.rb to mocha/minitest.rb - thanks to @grosser (#320 &
  #322)
* Fix warning when delegating to mock in Ruby 2.4 - thanks to @tjvc (#321 &
  #323)
* Updates to Travis CI configuration (73af600..9732726 & 0426e5e)
   2017-08-31 17:18:09 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-mocha to 1.3.0.

## 1.3.0

* Ensure all tests run individually - thanks to @chrisroos (#267)
* Update Travis CI build status badge to show master branch status (#264)
* Correct RSpec section of the README - thanks to @myronmarston (0cc039c8)
* Fix pretty printing of quotes in `String#mocha_inspect` (#215 & #223)
* Add release instructions to README - thanks to @chrisroos (70a5febd &
  3c664df7)
* Require at least Ruby v1.8.7 in gemspec - thanks to @knappe (3e20be8e)
* Remove redundant InstanceMethod#method_exists? - thanks to @chrisroos
  (8f58eddf)
* Reduce risk of hitting bug 12832 in Ruby v2.3 - thanks to @chrisroos (#277 &
  eca7560c)
* Fix JRuby build - thanks to @headius (jruby/jruby#4250) & @chrisroos (#274)
* Add latest stable version of JRuby to Travis CI build matrix (#288)
* Fix Ruby v1.8.7 builds on Travis CI (928b5a40 & 460dce5b)
* Deprecate passing block to mock object constructor (#290)
* Add a known issue to README for Ruby bug 12876 (#276)
* Add Ruby 2.4 and ruby-head to Travis CI build matrix - thanks to @junaruga
  (#297)
* Fix `Mocha::ParameterMatchers#includes` for `Array` values - thanks to
  @timcraft (#302)
* Use faster container-based virtual environments for Travis CI builds (#305)
* Rename `Mocha::ParameterMatchers::QueryStringMatches` to `QueryString` (#306)
* Handle blank parameter value for query string matcher - thanks to @weynsee
  (#303 & #304)
* Rename `Mocha::ParameterMatchers::QueryString` -> `EquivalentUri` (#307)
* Use `do ... end` instead of `{ ... }` in acceptance tests - thanks to
  @chrisroos (#294)
   2016-10-20 16:40:39 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-mocha to 1.2.1.

## 1.2.1

* Fixed #272. Workaround Ruby bug 12832 which caused interpreter to hang. See \ 
https://bugs.ruby-lang.org/issues/12832. Thanks to @chrisroos & @petems \ 
(6f1c8b9b, #273).

## 1.2.0

* Always use prepended module to stub class & instance methods for Ruby v2+ \ 
- thanks to @grosser & @chrisroos (43d56671, #244)
* Always use prepended module to stub AnyInstance methods in Ruby v2+ - thanks \ 
to @chrisroos (#262)
* Always set visibility of stub method to match stubbed method on included \ 
module - thanks to @grosser & @chrisroos (e87c03b0, #248)
* Always set visibility to stub method to match stubbed method on superclass - \ 
thanks to @chrisroos (38d902ad)
* Allow stubbing of method to which any instance responds (#200)
* Allow `includes` matcher to take matcher arguments - thanks to @lazyatom (#217)
* Avoid exception in older version of Rubygems - thanks to @chrisroos (78d930a7)
* Add licenses to gemspec as requested by @coreyhaines (#201)
* Fix typo in README - thanks to @jaredbeck (6119460d)
* Added section about using Mocha with RSpec & Rails to README (#221)
* Fix documentation for Mocha::API#stub method - thanks to @raeno (599b1dcd)
* Added backers and sponsors from OpenCollective - thanks to @piamancini (#253)
* Fix typo in docs for equals - thanks to @alexcoco (#254)
* Add known issue for Ruby v1.8 to README - thanks to @chrisroos (2c642096)
   2015-11-03 04:29:40 by Alistair G. Crooks | Files touched by this commit (1995)
Log message:
Add SHA512 digests for distfiles for devel category

Issues found with existing distfiles:
	distfiles/eclipse-sourceBuild-srcIncluded-3.0.1.zip
	distfiles/fortran-utils-1.1.tar.gz
	distfiles/ivykis-0.39.tar.gz
	distfiles/enum-1.11.tar.gz
	distfiles/pvs-3.2-libraries.tgz
	distfiles/pvs-3.2-linux.tgz
	distfiles/pvs-3.2-solaris.tgz
	distfiles/pvs-3.2-system.tgz
No changes made to these distinfo files.

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.
   2015-02-01 15:50:43 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-mocha to 1.1.0.

# Release Notes

## 1.1.0

* Set visibility of any instance stub method.
* Stub methods with a prepended method if there are other prepended methods. \ 
Thanks to @mrsimo.
* Improve docs for `Mock#responds_like` & `#responds_like_instance_of`.
* Use GitHub convention for instructions on contributing to Mocha.
* Fix typos in docs. Thanks to @10io
   2014-03-14 17:11:22 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
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.
   2013-06-16 18:17:41 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
Update ruby-mocha to 0.14.0.

## 0.14.0

* Official support for MiniTest v5. All tests now pass on the continuous
  integration build.

## 0.14.0.alpha

* Add speculative support for Minitest v5. Due to incompatibilities it has not
  yet been possible to run the Mocha test suite against Minitest v5. However,
  @zenspider (author of Minitest) provided the patch and he has tested it
  against Rails v4. Fixes #156. Thanks to @zenspider.
* Documentation updates.