Up to [cvs.NetBSD.org] / pkgsrc / devel / ruby-flexmock
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
devel/ruby-flexmock: update to 3.0.2
3.0.2 (2025-08-11)
What's Changed
* fix: explicitly forward keyword arguments when calling {#initialize} for
new_instances support by @doudou in #28
* chore: compatibility with ActiveSupport's Object#with by @doudou in #31
devel/ruby-flexmock: update to 3.0.1
3.0.0 (2024-07-18)
* Added keyword argument and explicit proc support. Keyword argument
support is Ruby 3.0+ only, getting the support to work on Ruby 2.7 deemed
to be too complicated. See the release notes for 2.4 below for
information about how migration can be done smoothly
* with now expects all expected keyword arguments to be explicitly given in
a natural way, for instance:
mock.should_receive(:m).with("some", "args", with: 42)
The values given to the arguments can be any matcher valid for the
positional arguments
* note that not giving any keyword arguments to with is interpreted as a
negative (no keyword arguments are expected), and will fail if some
arguments are given. Call with_any_kw_args after the with if you do not
desire validation of keyword arguments:
mock.should_receive(:m).with("some", "args").with_any_kw_args
* for more complex matches, pass a match object to the with_kw_args method.
For instance, to match only some keyword arguments, do
mock.should_receive(:m).with("some", "args").with_kw_args(hsh(with: 42))
* this release also makes matching procs explicit. Instead of passing Proc
at the end of with as in 2.x, call with_block or with_no_block. If
neither are called, flexmock won't validate either way (ignore whether or
not a block was given). The default is to not match blocks, that is
working
* The default is to assume that blocks are optional (i.e. flexmock will
match either way). Nonetheless, the method with_optional_block is
implemented to help migration from flexmock 2.4.0 (but is a no-op).
3.0.1 (2024-09-09)
* fix: handling of blocks in pass_thru (v3.0)
devel/ruby-flexmock: update to 2.3.8 2.3.8 (2023-08-13) * remove executable flag on all lib ruby files * in partial mocks, find the original method through metaprogramming * CI: Drop unused Travis sudo: false directive * Gemfile: use https for RubyGems.org * update required ruby version to 2.2, and update Travis ruby versions * CI: Use JRuby in the matrix * update the links in doc/ * README: Use SVG badges * fix: spelling of Minitest * chore: run tests through GitHub actions * Fixes support for minitest >= 5.19
devel/ruby-flexmock: update to 2.3.6 * fix interaction between based partials, signature matching and 'explicitly'
Update ruby-flexmock to 2.3.5. 2.3.2 * Make test-unit make_assertion compatible with new code. 2.3.3 * Define should_expect on partial mocks as well. * Fix unused variable 2.3.4 * Workaround Ruby 2.0.x brokenness w.r.t. singletons of classes 2.3.5 * Avoid deprecated Fixnum warnings on Ruby 2.4.0. * Add a LICENSE.txt file.
Update ruby-flexmock to 2.3.1. * fix mocking methods that are defined as private on Object * remove test of experimental stuff I can't understand * allow to stack verification contexts recursively using FlexMock.use * add some missing tests * fix stubbing the same method multiple times on a partial mock when partials_verify_signatures is set * fix signature validation when the last positional argument of a call is a hash * fix signature validation in presence of both keywords and blocks
Update ruby-flexmock to 2.3.0.
2.3.0:
- implemented validation of call arity for partial mocks. By setting
FlexMock.partials_verify_signatures = true
flexmock will verify on partials that the number of arguments, and the
keyword arguments passed to the mocked call match the existing method's
signature
2.2.0:
- #new_instances now mocks the #initialize method instead of mocking after the
allocation was done. This allows to do mock methods called by #initialize
itself. Behaviour when the allocator is explicitely provided is left
unchanged, which means that the old behaviour is still available by passing
:new to new_instances.
Update ruby-flexmock to 2.2.1. 2.2.0: - #new_instances now mocks the #initialize method instead of mocking after the allocation was done. This allows to do mock methods called by #initialize itself. Behaviour when the allocator is explicitely provided is left unchanged, which means that the old behaviour is still available by passing :new to new_instances. 2.1.0: - added `#and_iterates` to fix some shortcomings of `#and_yield` without breaking backward compatibility - strict partial mocks (and "based mocks" if `FlexMock.partials_are_based` is set to true) are now based on the object's singleton class, instead of its class.
Avoid build failures when chmod respects umask, and 'chmod -x' thus does not clear all bits. (Can happen on Linux -- https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/67583)
Update ruby-flexmock to 2.0.4. * auto-mock #kind_of? as well as #class on strict mocks.
Update ruby-flexmock to 2.0.3. * Fixed infinite recursive call for rspec check * fix strict mocks of BasicObject * minitest: do filter assertion backtraces * auto-mock #kind_of? as well as #class on strict mocks
Update ruby-flexmock to 2.0.2. * Avoid infinite recursion when a mocked method is called within #inspect. * Remove duplicate method SpyDescribers.call_description / FlexMock.format_call.
Needs Ruby 2.0+
Update ruby-flexmock to 2.0.1. pkgsrc change: update HOMEPAGE. Version 2.0.1 * A few bug fixes. Version 2.0.0 * bump to 2.0 to mark the change of maintainership. I hope I won't disappoint. * require 'flexmock' no longer pulls test_unit_integration. Require the latter explicitely * dropped support for pre-2.0 Rubies * added explicit minitest support. This makes the minitest integration much nicer to work with (in particular, the flexmock_teardown is now executed "just at the right place"), and fixes issues with minitest 5. Just require flexmock/minitest to get it. * partial mocks now supports prepended modules * validation errors that happen when a method is called (i.e. unexpected arguments, wrong call count) are reported with the backtrace of the call instead of with the backtrace of the expectation definition.
Update ruby-flexmock to 1.9.3. Exact changes aren't available. Please refer commit log <https://github.com/jimweirich/flexmock>.
Update ruby-flexmock to 1.3.2. No exact changes aren't available, please refer github: https://github.com/jimweirich/flexmock/commits/master. Update HOMEPAGE, too.
Update ruby-flexmock to 1.3.1. == Changes in 1.3.1 * Removed use of assert_block (which is deprecated in MiniTest). * Documentation fixes.
Update ruby-flexmock to 1.3.0. = FlexMock 1.3.0 Released FlexMock is a flexible mocking library for use in unit testing and behavior specification in Ruby. This release is a minor release with a few bug fixes and some simple features. == Changes in 1.3.0 === Features * Add 'and' and 'on' modifiers for the RSpec spy matcher. * Add 'and' and 'on' options to the assert_spy_called test method. * General documentation improvement. === Bug Fixes * Fix bug in should_fail test helper that was not detecting failed failures.
Update ruby-flexmock to 1.2.0. Exact changes aren't avaiable, please refer github: https://github.com/jimweirich/flexmock/commits/master.
Update ruby-flexmock to 1.0.2. Changes are unavailable.
Update ruby-flexmock to 1.0.0. == Version 1.0.0 * Added spy support. * Added base class mocking restrictions. * Using singleton_methods to get list of singleton methods (rather than methods(false)) * Correctly handling mocking methods that were meta-programmed with method_missing.
Update ruby-flexmock package to 0.9.0. = FlexMock 0.9.0 Released FlexMock is a flexible mocking library for use in unit testing and behavior specification in Ruby. Release 0.8.5 is a minor release with a few bug fixes. == Ruby 1.9.3 Compatibility * Fixed a number of minor warnings reported by the 1.9.3 version of Ruby.
Update ruby-flexmoc to 0.8.11. Changes are unknown.
Update devel/ruby-flexmock to 0.8.7. * Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk. * Add LICENSE. Changes for 0.8.6 and 0.8.7 are unknown. == Version 0.8.5 * Fixed warning about a void context. * hsh() argument matcher now reports its matching constraints in error messages. == Version 0.8.4 * Added support for rails 2.2.x in should_render_view.
Update ruby-flexmock package to 0.8.3. = Changes for FlexMock == Version 0.8.2 * Added workaround for compatibility issues with RSpec on Rails.
Update ruby-flexmock package to 0.8.2. = Changes for FlexMock * FlexMock partial mocks will now override any preexisting definitions for "should_receive". Previously, FlexMock would honor preexisting defintions, but an RSpec on Rails bug loads the RSpec mocks, even when other mock libraries are configured. This allows flexmock to correctly use partial mocks in the presence of an ill-behaved mock library. == Pre-Version 0.8.1 * Added Joe O'Brien's patch to allow view stubbing in Rails 2.0 * Added Evan Phoenix's patch to remove allocate from default allocators in new_instances (for Rubinius compatibility).
Initial import of ruby18-flexmock-0.8.0 as devel/ruby-flexmock. FlexMock is a flexible mocking library for use in unit testing and behavior specification. Mocks are defined with a fluent API that makes mock specifications easy to read and easy to remember.
Initial revision