Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/freerange/mocha

A mocking and stubbing library for Ruby
https://github.com/freerange/mocha

Various improvements to README

Inspired by #207 and #390. It's still not perfect, but I think this is
definitely an improvement...

fed0eee65a3f8e4dff32d22df017ccd614839403 authored about 5 years ago
Consistently use single quotes in README

d07d41301de9bcce709d5a007ae4254a84abeedc authored about 5 years ago
Add sub-section under Rails section of README for other test frameworks

7b1857ebf8e45b1a5f26161d1083655002f68727 authored about 5 years ago
Move RSpec & Cucumber sub-sections into Bundler section of README

These sections are not Rails-specific and so I think this order makes
more sense.

75ffc2d648c2f507cec2384a14d5eed6c85145c5 authored about 5 years ago
Add note to README re Rails tests using MiniTest by default

5c4d12b02ef8dcc5fadbbc3d1136a850ff4d19d4 authored about 5 years ago
Remove duplicate MiniTest sub-section in Rails section of README

b65b070fc64683d602a1fd7c1c777e29ee2f2a7d authored about 5 years ago
[skip ci] Update documentation for v1.11.2 release

3fc8e307b148cea504dad04fc6aef15da9adbcb5 authored about 5 years ago
Bump version to 1.11.2 & prepare for release

0f9042678c593fd03266f3a0c354ee8f9d737e92 authored about 5 years ago
Only inspect objects when necessary

This regression was introduced in v1.10.0 in this commit [1] and is
causing the test failures de...

368abd98e6eb6e3dd9b0a4d28e3d8ad927cb7eba authored about 5 years ago
Delete unused PrettyParameters class

The logic in this class was moved into the Parameters class in this
commit [1], which was rename...

314ea92207e8fffec930e1810aac59c37de9537d authored about 5 years ago
set up {Moch,Stubb}aExampleTest as acceptance tests

4881cc58f667e2df4e590a92889830b98a675a7f authored about 5 years ago
replace original_{method,visibility} attrs w/ ivars

...since the attrs were only used internally and were giving rise to a
'warning: private attribu...

d917f3322b7dc15e0dc50f3e4f95fec56740451f authored about 5 years ago
Avoid rubocop comments appearing in YARD-generated docs

By using the single-line version.

Note that the comment still shows up in the source code in th...

d8019eed369bff98b76ab05d7abe6fdc1ad71f86 authored about 5 years ago
Warn when mock object receives invocations in another test

PR: #442

A deprecation warning is now displayed when a mock object instantiated
in one test rec...

6296fd5975f1eb9c8986e8f481f5eefc3a3a4bb6 authored about 5 years ago
Extract Mock#raise_unexpected_invocation_error method

To reduce complexity of Mock#method_missing method.

This means we no longer need to disable a n...

2389ff35f4d377d4334802b4ffc3d92c42d5cf8e authored about 5 years ago
Extract Mock#check_responder_responds_to method

To reduce the complexity of Mock#method_missing.

d53327a3d4f93867708984d22f763384d5f68d25 authored about 5 years ago
Warn when mock object receives invocations in another test

c.f. RSpec's "Doubles cannot be reused in another example" scenario [1]

[1]: https://relishapp....

d66c2b501685fe827a2c5e2236475e78d8082c11 authored about 5 years ago
[skip ci] Update documentation for v1.11.1 release

6672b624e319bd6e4dbff9c32a98eddf26a03bd2 authored about 5 years ago
Bump version to 1.11.1 & prepare for release

109829ace0ba6b48896018b93bad7a77e3510e70 authored about 5 years ago
Enable reinstate_undocumented_behaviour_from_v1_9 config option by default

I meant to do this when I released v1.11.0 so that if a project's build
had started failing in v...

b91b1c9e3640744d63e9f7cd1945b2dd9b3dcb4d authored about 5 years ago
[skip ci] Update documentation for v1.11.0 release

54b1b60e0ef2f078c5d6239a86c577d186b135fc authored about 5 years ago
Bump version to 1.11.0 & prepare for release

cbb01cbe7854e97196b734e0dad53ebeb15c9ab0 authored about 5 years ago
Add Expectation#with_block_given &#with_no_block_given

PR: #441

2ddbdfd2c240eed79311afb1a984cd454fbbc4d9 authored about 5 years ago
Expand deprecation warning in Invocation#call

Now that Expectation#with_block_given exists, we can make a more useful
suggestion of how to avo...

cf4c1e433cf2a0445c4641de5c57c13f9add7abb authored about 5 years ago
Include representation of supplied block in invocation description

I think it's useful and more consistent to include something in the
invocation description to in...

7ba3d685852805af0bcac0e351adcdcc2477338e authored about 5 years ago
Add Expectation#with_block_given & #with_no_block_given

This allows expectations to match only invocation which do or do not
supply a block. The default...

454652a4114f19aad47cddfb4d7e49694a7956fa authored about 5 years ago
Improve handling of non-Array arguments to Expectation#multiple_yields

This was highlighted when investigating this issue [1]. It turned out
that this project was call...

215f8e1301fb8ea7544f0937a0cc7878e033a621 authored about 5 years ago
Add some baseline acceptance tests for yielding behaviour

c2cac911cf0be9a4482ddb6a5b8d9228ff3fa5fc authored about 5 years ago
Add missing require statement to acceptance_test_helper.rb

1070fc02015a8ea36ad50782f80b557813595c02 authored about 5 years ago
Simplify implementation of yielding functionality

PR: #439

Co-authored-by: Nitish Rathi <[email protected]>

7f2767f5b02e22e457348345a2063948c8930f56 authored about 5 years ago
Rename YieldParameters#multiple_add to #add

Now there's no longer both a YieldParameters#add method *and* a
YieldParameters#multiple_add met...

e19b2b1b4e492c227f6fa41f67adbaeca34ad369 authored about 5 years ago
Convert MultipleYields class to be a simple Array

This means that the parameter_groups instance variable in the
YieldParameters class is now just ...

cd640dcd67717689c4bb846136bb0c8437932aa0 authored about 5 years ago
Inline MultipleYields#each

c002e857e42fccf398be424d22a4ae548eb399cb authored about 5 years ago
Simplify YieldParametersTest

By inlining local variables and deleting unnecessary calls to
YieldParameters#next_invocation.

ddd47dc34ffa3936106eda982c70517ca0076c0c authored about 5 years ago
Extract assertion method to DRY up YieldParametersTest

087aca9bea914e79c3c661dba54a1d0ea5cbbd80 authored about 5 years ago
Remove redundant MultipleYieldsTest

The behaviour of MultipleYields is fully covered by YieldParametersTest.

4f8c4dcebbdfd3507ea3356edd7926bcd8084271 authored about 5 years ago
Remove assertions for YieldParameters#next_invocation return value

This will now only ever be an instance of MultipleYields, so there's no
longer much point in ass...

670dd0f951749115293c35d28719939f26b397d5 authored about 5 years ago
Remove unused NoYields class

We're now using MultipleYields to implement the functionality that was
in this class.

2ddb7a50f29f8177cdeb4526144e1f3db0ee4214 authored about 5 years ago
Use MultipleYields instead of NoYields

By default an Expectation and hence a YieldParameters is not meant to
attempt to yield to a matc...

41731a4fdfaecc2d46c94f2be7a6baabd58a5ab5 authored about 5 years ago
Remove unused SingleYield class

We're now using MultipleYields to implement the functionality that was
in this class.

0bacc0183365fc0838a88e2b6c9ec4774b3ca2a4 authored about 5 years ago
Inline YieldParameters#add

2ce6c93caaf5549724e3bd05c70c2d10f4ef526c authored about 5 years ago
DRY up YieldParameters#add by calling #multiple_add

The former is just a special case of the latter.

f70389dac2d80bd6519bb017ab48ebaf05f4c296 authored about 5 years ago
DRY up Expectation#yields by calling #multiple_yields

The former is just a special case of the latter.

eb76a82578b87d12ea5c04ed6e95044232dc3ade authored about 5 years ago
move static yard options from rake task to .yardopts

This allows docs to be generated without using rake using almost the same
options as with rake (...

bd9f971dfcd9a229f5b28b81f39071d4e77380dd authored about 5 years ago
Display a sponsor button on GitHub repo page

9fc5911bb7d77cc4c10b2875508a6be332bf6592 authored about 5 years ago
Use new Deprecation.warning behaviour in Invocation#call

I should've done this in this commit [1].

[1]: b6049b4b7891a5070c7d97a9511aafacec53af39

932d1166a36b3601002cdcd95e8160e5a05df829 authored about 5 years ago
[skip ci] Update documentation for v1.10.2 release

bca55ae65b7c2faf62ebd18d0fc0421f2a612055 authored about 5 years ago
Bump version to 1.10.2 & prepare for release

f8bc4943dbd5e9921ff86e6ccd76ed3c78a5d403 authored about 5 years ago
Optionally reinstate undocumented behaviour from v1.9

PR: #438

The new configuration option is `reinstate_undocumented_behaviour_from_v1_9`.

46942e28891022b82845e6c528b80fe39d6edc37 authored about 5 years ago
Option to reinstate v1.9 Expectation#yields & #multiple_yields behaviour

In v1.9 if Expectation#yields or Expectation#multiple_yields was called
on an expectation, but n...

084f7b0cc93694c6758af444f0c4148ca29cc311 authored about 5 years ago
Store block on Invocation vs passing in via Expectation#invoke

I think this is a more natural home for the block.

72dac85f0aced2c9a27a3de3d6db3e0f46e80668 authored about 5 years ago
Deprecation.warning now accepts multiple messages

This reduces duplication at the callsites.

b6049b4b7891a5070c7d97a9511aafacec53af39 authored about 5 years ago
Option to reinstate v1.9 API#mock, #stub, #stub_everything behaviour

The old behaviour is reinstated, albeit with deprecation warnings, if
the reinstate_undocumented...

d596cc64581783dc018dc2af9c20ea89bf896210 authored about 5 years ago
Inline API#create_mock method

In preparation for adding a deprecation warning specific to each of
API#mock, #stub & #stub_ever...

2f79b58fed8f360416c00ad6748ed405f6054267 authored about 5 years ago
Add config option for retaining undocumented behaviour from v1.9

7a60ebcba5013d54d8e8bbd39a891ebd85d174c0 authored about 5 years ago
[skip ci] Update documentation for v1.10.1 release

5bb2210a66d2e5e3f826d56a502466836c7491c6 authored about 5 years ago
Bump version to 1.10.1 & prepare for release

f44776e72b5e7dbe3c69ed309f0b35cff132adea authored about 5 years ago
Reintroduce allow check removed in 948a0c2

Fixes #432 by short-circuiting the method_exists? check in case the treatment of
the action is t...

469d4b174f15075af0ca9427150d25017c908c0c authored about 5 years ago
Ensure ObjectMethods & ClassMethods included when API extended

Cucumber's World method builds an instance of a "world"
object and then *extends* that object wi...

43778756170857b1274697c94c974bb1d5bf805b authored about 5 years ago
[skip ci] Update documentation for v1.10.0 release

0b768ee932009b1bcca7a3fd7dda7603b7c23c24 authored about 5 years ago
Bump version to 1.10.0 & prepare for release

059dafb738980665dd2e179a8cf55da4890b2c01 authored about 5 years ago
Add docs for change to undocumented behaviour in API#mock, #stub, etc

d30c1717134f8a631bcc531c3228d1b50d3f6670 authored about 5 years ago
Improve deprecation warning when requiring 'mocha/setup'

388f44d778c2239b52ffe5c52ace253419f91bd3 authored about 5 years ago
Add documentation for integration with Cucumber

13ab797bcf6afd6c4d7d9f6a83bed8c8b9cc3b26 authored about 5 years ago
[skip ci] Update documentation in preparation for 1.10.0.beta1 release

2359afc123e0de558e9683a81a6a41bf20fd6877 authored about 5 years ago
Update release notes & bump version in preparation for release

ef70734de1844f587846dbb71b720f4b8b06471f authored about 5 years ago
Hide ClassMethods#method_visibility & #method_exists? methods to avoid clash with Rails

PR: #428

These methods are not part of the public API and yet they are included into every cl...

894243ee7d7a76d5c2897b09727118f20a8f65cc authored about 5 years ago
Rename ClassMethods#method_exists? -> __method_exists__?

c.f. #70

This method is not part of the public API and yet it is included into
every class in A...

3e76e4b82f4d354a8201166073547251580a5c1a authored about 5 years ago
Rename ClassMethods#method_visibility -> __method_visibility__

c.f. #70

This method is not part of the public API and yet it is included into
every class in A...

11befbeb3fd3c39720b63f76b42ecb4a6ab48a05 authored about 5 years ago
Do not document ClassMethods#method_visibility

This is not part of the published API.

5530fda174a84bacdabce614da3c4c36b75c7a89 authored about 5 years ago
Update documentation in preparation for 1.10.0.alpha release

6a81f1d9f0a0cdc01b921fbb74f70db8ef479ed9 authored about 5 years ago
Bump version to 1.10.0.alpha to prepare for release

Due to the number of changes since the last release, I'm releasing an
alpha version which I can ...

4a1faa3e6f92c6be2b8d1e28d685ef6546c41b86 authored about 5 years ago
Update release notes in preparation for release

f8ab3fc5dd413ea222522ea653645e4c46faa690 authored about 5 years ago
Fix YARD warnings for ParameterMatchers#all_of & #any_of

By correcting the name of the `param` definition to match the actual
parameter name.

a2c0d64a91590614e0cb44d823e95342b435404b authored about 5 years ago
Fix YARD warnings for methods with overload documentation

By nesting `param` definitions inside the appropriate `overload`
definitions. In a similar vein ...

472d54161fab9bbd093a8b8c6928a423cbad9897 authored about 5 years ago
Deprecate old-style Rails plugin

Apparently Rails plugins in the original sense (i.e. installed into
`vendor/plugins`) were depre...

2df7713496efc411e6f9f6be339f87bdffac9ec5 authored about 5 years ago
Deprecate support for monkey-patched versions of test-unit & minitest

Versions of minitest earlier than v3.3.0 (27 Jul 2012) and versions of
test-unit earlier than v2...

a34e1a886eaac067122e755eb2bb4da76c328965 authored about 5 years ago
Deprecate support for Ruby versions earlier than v1.9

This is long overdue. Extended maintenance of Ruby v1.8.7 ended on 31
Jul 2014 [1]. Actually dro...

c5f8496d5102445de315a10efc385209a962bdc1 authored about 5 years ago
Configuration improvements

PR: #421

This introduces a new (hopefully less-surprising) configuration mechanism and adds a...

2ad3031f1afc47d9cd3b83370d490d952fab2b52 authored about 5 years ago
Move Mocha.configure & .configuration -> mocha/configuration.rb

This seems like a better home and makes the require statements more
intention-revealing/explicit.

50cc0b4d9d8ee5d582eb8c43fff3d07fe44f72f6 authored about 5 years ago
Use Object#send vs #public_send for now to support Ruby v1.8.7

730528a54512aa99b0b224cd37c6329d75efd46e authored about 5 years ago
Improve docs for stubbing_method_on_nil configuration option

See this commit [1].

[1]: a65ea1ed3dce43cbc2cc16b3660afd2cce3db33e

8e786ea6aedcf9f374f9561a5b7c1a141291122c authored about 5 years ago
Deprecate Configuration.prevent

f8d42b82ff124de9758d8f2a0d396b92dcdf5947 authored about 5 years ago
Add display_matching_invocations_on_failure configuration option

So that this configuration option can be set without using the
MOCHA_OPTIONS environment variabl...

c2b2532f36c2e9defaee71cea47cd06aa410edc6 authored about 5 years ago
Rename local variable in Mockery#check

I don't think the string itself contains an "error" as such.

49151dd7573dfaa051683687857ac587162275cd authored about 5 years ago
Refactor Mockery#check

948a0c23a6b230a16d0cd36e3d0dcf77f664d4be authored about 5 years ago
Replace Configuration.allow?, .warn_when?, .prevent? w/ instance methods

This means that, for example,
`Mocha::Configuration.allow?(:stubbing_method_unnecessarily)` is
r...

2e29c358ce3d9711c04118123eccc8506206df33 authored about 5 years ago
Deprecate Configuration.warn_when

3a859f81d5bac2fdb7a59134854321512fb8add1 authored about 5 years ago
Deprecate Configuration.allow

e553bde0b40bb6e115f267dff87df350372be1d6 authored about 5 years ago
Provide a terser way to set configuration options

For example:

Mocha.configure do |c|
c.stubbing_method_unnecessarily = :prevent
...

45b3fb32908b5ab7c54232d16a9908c3990d990a authored about 5 years ago
Introduce Configuration.override to temporarily change configuration

I want to deprecate Configuration.allow, .prevent & .warn_when, but the
new methods like #stubbi...

adfb7cfeb3d8ef97c499dd14e99d74735691bf1b authored about 5 years ago
Allow block-style setting of multiple configuration options

This makes setting configuration options terser and less non-standard, e.g.

Mocha::Configur...

5c37d19eef8a28c284c30561bb4081edccb9c391 authored about 5 years ago
Fix typo in docs for Mocha::Configuration.prevent

266ce71c8675c46aeafae1da01245ea3544aa5cc authored about 5 years ago
Avoid deprecation warnings when running acceptance tests

I was seeing deprecation warnings like this one:

Mocha deprecation warning at /Users/jamesm...

3507344a051242b64705ff400fb2be76a7b1e1e0 authored about 5 years ago
Merge pull request #418 from freerange/put-deprecations-into-effect

Put deprecations into effect

b24d460694d7847088228c62a21b5f306d3faeba authored about 5 years ago
Remove deprecated mocha/mini_test.rb

This file was renamed to mocha/minitest.rb in v1.4.0 in this commit [1]
and can now safely be re...

c44895cd9c97b2995d56d3ba8e28453fac231f40 authored about 5 years ago
Fail fast if no test library loaded

This was first attempted in v0.12.0 in this commit [1], but then
partially reverted to display a...

50f071a7e177b2e387478c956ae8a26c5fda3e19 authored about 5 years ago
Remove deprecated ParameterMatchers#has_equivalent_query_string method

This method was replaced with ParameterMatchers#equivalent_uri in v1.3.0
in this commit [1] and ...

1607469c402b0e432c4e9897ddb7ab2c413bf7fe authored about 5 years ago
Removed optional block for Mocha::API#mock, #stub, #stub_everything

This functionality was deprecated in v1.3.0 in this commit [1] and so it
can now be safely remov...

15414a39742778b192d99bd7ff4c081e4f77ba83 authored about 5 years ago
Remove deprecated mocha_standalone.rb & mocha/standalone.rb

These files were deprecated in this commit [1] in v0.13.0 and can now be
safely removed.

[1]: h...

9aec829452d1e4ee25adbdd5b7bacffc93401fb1 authored about 5 years ago