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

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


Branch: CURRENT, Version: 2.7.1, Package name: ruby32-mocha-2.7.1, 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/ruby26-base]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 68 KB

Version history: (Expand)


CVS history: (Expand)


   2024-12-09 14:53:10 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.7.0

2.6.0 (2024-11-24)

External changes

* Expectation with never cardinality should display deprecation warning
  (#681) - thanks to @ducmtran for reporting and testing

WARNING: This release results in some incorrect deprecation warnings:

* The logic for displaying the deprecation warnings is fixed in v2.6.1
  (#686).

Internal changes

* Simplify backtrace related assertions (#680)
* Remove unused ExpectationList#match_but_out_of_order (f2fa9919)

2.6.1 (2024-11-28)

External changes

* Fix logic for displaying deprecation warning for expectation with never
  cardinality (#686) - thanks to @davidstosik for reporting

2.7.0 (2024-12-07)

External changes

* Fail fast if invocation matches never expectation (#679, #678, #490, #131
  & #44) - thanks to @ducmtran & @davidstosik for reporting

Internal changes

* Workaround for JRuby jar-dependencies issue (#690)
* Ruby v3.4 stacktrace uses single-quote vs backtick (#688 & #689) - thanks
  to Vít Ondruch

WARNING: This release fixes a very old bug

* The bug relates to the use of Expectation#never in combination with other
  expectations on the same method.

* Please ensure you fix the relevant deprecation warnings when running
  against v2.6.1 before upgrading to v2.7.0.

* Previously, the following test would have passed, but now it will fail
  with an unexpected invocation error on the foo.bar line.

	foo = mock('foo') foo.stubs(:bar) foo.expects(:bar).never foo.bar

2.7.1 (2024-12-09)

External changes

* Deprecate Configuration#stubbing_method_on_nil= (#694)
* Indicate when parameter matcher logic is defined by block passed to
  Expectation#with (#698, b30e4434)
* Improve documentation for Expectation#with, especially when it is passed a
  block (#698, #682, #606 & #681)
   2024-10-27 14:37:32 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.5.0

2.5.0 (2024-10-23)

External changes

* Add metadata to gem specification, including changelog_uri (#608,
  eb1b8ea2) - thanks to @mattbrictson
* Fix warnings in Ruby v3.4 (#672, #669) - thanks to @radville for reporting
* Add warnings & notes about regressions, known issues, etc to release notes
  (#675, #676 & #677) - thanks to @davidstosik

Internal changes

* Fix jaro_winkler compilation errors on MacOS (5c7d14cb)
* Fix typos in IncludesTest test names (6fb5a5a6)
* Fix rubocop version constraint for Ruby > v2.2.0 (d5c6b98a)
   2024-07-28 15:22:51 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.4.5

2.4.5 (2024-07-24)

External changes

* Fix regression when stubbed method expects Hash but receives
  ActionController::Parameters object (#662, #664) - thanks to @evgeni for
  reporting and testing
   2024-07-20 17:26:34 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.4.2

2.4.1 (2024-07-16)

External changes

* Fix regression in matchers when used with keyword arguments (#654 & #655)
  - thanks to @ElvinEfendi for reporting

Internal changes

* Reduce duplication & consolidate #to_matcher method definitions (600ee2aa,
  e9de64e4, #655)

* Change #to_matcher method to use keyword arguments (3b60b7df, #655)

2.4.2 (2024-07-18)

External changes

* Don't trust Object#is_a? in presence of mock objects (#656) - thanks to
  @casperisfine
   2024-06-30 18:11:46 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.4.0

2.4.0 (2024-06-16)

External changes

* Improve rendering of keyword arguments (#652) - thanks to @casperisfine

Internal changes

* Improvements to #mocha_inspect unit tests (#650)
   2024-05-26 16:50:37 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.3.0

2.3.0 (2024-05-17)

External changes

* Fix nested parameter matching for keyword arguments (f94e2504, #648) -
  thanks to @CodingAnarchy for reporting
   2024-05-05 18:45:54 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-mocha: update to 2.2.0

2.2.0 (2024-04-10)

External changes

* Support multiple methods in responds_with matcher (f086b7e4, #578) -
  thanks to @vlad-pisanov for the suggestion
* Add block syntax for sequences (93fdffd, #61)
* Improve sequence failure message (0800c6ff, #60)
* Drop support for Ruby v2.0 (85848fb0, #642)
* Include the original test name in expired stub error messages (ca3ff8eb,
  #641, #642) - thanks to @casperisfine
* Avoid rubocop directive ending up in YARD docs (2a9ee81a)
* Update docs to fix those for Mock#method_missing (cee0bad6)
* Reinstate missing CNAME for GitHub Pages site (da67bb0d)
* Use Ruby v1.9 Hash syntax in docs (6de20726, #625)
* Add missing YARD tag for API#sequence name param (343c5979)
* Add missing YARD tag for API#states name param (f798df83)

Internal changes

* Tidy up Minitest vs MiniTest references (#626, #614, #615) - thanks to
  @zenspider & @Maimer for their help
* Add Ruby v3.3 to CI build matrix (ce31b544)
   2023-07-30 06:03:31 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-mocha: update to 2.1.0

2.1.0 (2023-07-27)

External changes

* Fix compatibility with Minitest (#614) - thanks to @kyrofa & @manewitz for
  reporting and to @zenspider for his input

Internal changes

* Update URLs for links to Ruby & MIT licenses (d6470af4)