Ecosyste.ms: OpenCollective

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

mocha

We are on a mission to develop & maintain a mock object library for Ruby.
Collective - Host: rubytogether-user - https://opencollective.com/mocha-deleted - Code: https://github.com/freerange/mocha

Extract ExpectationTest#invoke

In preparation for passing Invocation instance to Expectation#invoke.

github.com/freerange/mocha - 077e8578f7f617ab19fd6d4931118a9381e8f7e0 authored about 5 years ago
Inline local variables in ExpectationTest

In preparation for extracting an `invoke` helper method.

github.com/freerange/mocha - 40e7e351b74d709ed24b033436ee9d57490ea608 authored about 5 years ago
Use Integer#times in ExpectationTest to make tests clearer

This makes the relationship with Expectation#times clearer.

github.com/freerange/mocha - d7fb22434ac60463ea5327f6f82f82232540963a authored about 5 years ago
Fix ExpectationTest tests which were only passing accidentally

The names of these tests imply that the intention is that the method
name should match (i.e. sho...

github.com/freerange/mocha - 41cc6bf5f2018b79ce0e16b2b440f6880d14043f authored about 5 years ago
Fix MacOS version extraction

RUBY_PLATFORM doesn't necessarily end with $, as it may include a minor
version number (e.g. x86...

github.com/freerange/mocha - 8a0f253504daac0a7ff5db0e58631f380620ed54 authored about 5 years ago
Merge pull request #417 from freerange/fix-test-failures-on-mac-osx-catalina

Fix test failures on Mac OSX Catalina

github.com/freerange/mocha - a0c8bc7b7c78938b331dceb5c8cb8466c27a7dd9 authored about 5 years ago
Exclude syscall from Object methods tested on MacOS Mojave & above

This might be overly conservative, because I know the tests worked
without this exclusion on Mac...

github.com/freerange/mocha - c74df55cab397c41717750ae4c025732707b38bc authored about 5 years ago
Make MockTest::OBJECT_METHODS definition clearer

github.com/freerange/mocha - 95504cc74b7697378704c2857e0ceb4bf4111985 authored about 5 years ago
Extract constants in MockTest for clarity

github.com/freerange/mocha - 9add8ea93edd14741970b5867a4d4148bc0f70b4 authored about 5 years ago
Use default Max for Metrics/PerceivedComplexity cop

By explicitly disabling 4 violations.

github.com/freerange/mocha - e95716ae629255816fe80b3ca79416d859aeeb3b authored about 5 years ago
Use default Max for Metrics/CyclomaticComplexity cop

By explicitly disabling the cop for 4 violations.

github.com/freerange/mocha - d19f85335488e3c36d43e58c923518d622593825 authored about 5 years ago
Use inline version of rubocop disable in a couple of places

github.com/freerange/mocha - a3bdc518f74e11b48ca78e5c832c9651987e8cef authored about 5 years ago
Use default Max for Metrics/BlockLength cop

By explicitly disabling 2 violations.

github.com/freerange/mocha - d6ddf3658e6717540821ff8b511da8814f652c2d authored about 5 years ago
Reduce Max for Metrics/AbcSize cop

By explicitly disabling cop for one violation.

github.com/freerange/mocha - 09a6847ac2dba2545bcb545add0ceae931713b23 authored about 5 years ago
Split Cardinality test method up

github.com/freerange/mocha - 2a1240e6ad7bfacd36060c2043f0c2e3f49d2e68 authored about 5 years ago
Fix inconsistency in CardinalityTest

github.com/freerange/mocha - aa10e0a8ec9e4b2a98cbd8e3c0883d8972756255 authored about 5 years ago
Use default Max for Metrics/ModuleLength cop

Explicitly disable cop for the one violation. This should avoid any
other long modules appearing.

github.com/freerange/mocha - 6f4db70bcb36e29b51554355c27c8f21c01d96dc authored about 5 years ago
Disable Style/Documentation cop in main rubcop config

I'm happy not having class/module level documentation comments.

github.com/freerange/mocha - d4edb1ced3c5baf2cf28f641440c0de1c4d5c51f authored about 5 years ago
Update rubocop to-do list

I generated this using the following command:

$ rubocop --auto-gen-config

github.com/freerange/mocha - aa16ea67b702b69c2af4cb200f9cda01789709fa authored about 5 years ago
Update JRuby version in Travis CI config

JRuby v9.2.9.0 was released at the end of Oct 2019 [1].

[1]: https://www.jruby.org/2019/10/30/j...

github.com/freerange/mocha - eb061c53faa31926a19cab9eb82e091798b9964e authored about 5 years ago
Update Ruby versions in Travis CI config

These are the latest point releases of Ruby.

github.com/freerange/mocha - 18cb1a93a56cffc632a3211e752ed0c9ec4f82da authored about 5 years ago
Consistently use assert_raises

PR: #412

Closes #405.

github.com/freerange/mocha - a66b7bede17cd7e4f7dc185b9e9b1bac86b3eabb authored about 5 years ago
Pass invocation to expectation list methods

PR: #411

Closes #408 and #409.

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

github.com/freerange/mocha - c3d8b999350db9a35bc71c86b57e7019f0a4e81f authored about 5 years ago
Extract Expectation#verbose? method

github.com/freerange/mocha - a6850d999e0623334242fba9098058d59a815647 authored about 5 years ago
Extract Invocation#result_description method

github.com/freerange/mocha - a92cdc2ff0553d273547d1f30d5d9f4b9db1d6ae authored about 5 years ago
Reuse Invocation#call_description method in #full_description

To reduce duplication.

github.com/freerange/mocha - 811dd80a965ee84527a79661ee6e923b0f893aa5 authored about 5 years ago
Improve naming of Invocation description methods

github.com/freerange/mocha - ed506a9c45376635e3c5022a48b33a71edc1ac23 authored about 5 years ago
Make Invocation description methods symmetric

github.com/freerange/mocha - b32007aa22939227efa5daf555ae8cb186756f3b authored about 5 years ago
Inline local vars in Invocation#full_description to reveal duplication

github.com/freerange/mocha - 713facd39c268c508925049838fcedb9d8d75ae6 authored about 5 years ago
Move description methods from UnexpectedInvocation -> Invocation

And remove the now redundant UnexpectedInvocation class.

github.com/freerange/mocha - 5fdc3da07daf272b3edb98f23864ff91e1fd4aad authored about 5 years ago
Reveal duplication in UnexpectedInvocation description methods

Note that eventually the plan is to remove the UnexpectedInvocation
class entirely and so that's...

github.com/freerange/mocha - 3bf68b9367adfd9d7f29b42961432917fbc03239 authored about 5 years ago
Pass invocation into Expectation#invoke

github.com/freerange/mocha - 71fa281f2d452cc9e465e41432471c2e767aeb16 authored about 5 years ago
Pass mock & method name into Invocation constructor

This is in preparation for passing Invocation to Expectation#invoke.

github.com/freerange/mocha - 72f6401bbd719d86ef38728196790816e363faa0 authored about 5 years ago
Inline Expectation#method_name

This is a small step towards pushing more logic into the Invocation
class.

github.com/freerange/mocha - 2f9ec4d867e1f3b9b96db75d533c1f40334edc79 authored about 5 years ago
Extract invocation into local variable in Mock#method_missing

github.com/freerange/mocha - 44c78cefcf59edd538231121442f91d4ead84aae authored about 5 years ago
Pass invocation to ExpectationList#match

github.com/freerange/mocha - 0deb490623be430ffc3a9b3c80b5536236850e17 authored about 5 years ago
Pass invocation to ExpectationList#match_allowing_invocation

github.com/freerange/mocha - 9f654abe692dd5118fbcab91117769ab592282e1 authored about 5 years ago
Pass invocation to ExpectationList#matching_expectations

github.com/freerange/mocha - c1b12d8b29f073c852791d47ea890a8c1d2806e0 authored about 5 years ago
Temporarily make Invocation#arguments externally immutable

This is a step towards encapsulating the arguments entirely within the
Invocation class.

github.com/freerange/mocha - 3f1b7699d6bb4a5c0641d2aadbd7fbeab21ec568 authored about 5 years ago
Pass Invocation to Expecation#match?

github.com/freerange/mocha - 4c24a3c1f3f0a5b5c4418865c6e6b0fe94611687 authored about 5 years ago
Only need to use ParametersMatcher in Invocation#mocha_inspect

So move the instantiation of ParametersMatcher into that method.

github.com/freerange/mocha - ffb16e922272b23dcf2a940a3703b3bb63848bc5 authored about 5 years ago
Switch args for Invocation constructor & #call

This is in preparation for passing Invocation to ExpectationList
methods.

This also simplifies ...

github.com/freerange/mocha - a8f7d0ac1dc4fb1a7f5b4dcdbb2a9bce7bbaf5da authored about 5 years ago
Rename block argument in Invocation#call

github.com/freerange/mocha - feb9c070f18406878df2b4dd2ce87070603ec189 authored about 5 years ago
Encapsulate invocations inside cardinality

Also handles Expectaction#throws scenario.

PR: #410

Second bunch of commits from #394.

Co-aut...

github.com/freerange/mocha - 44708253962238e7ecfb14701c908f7a4a8ad6be authored about 5 years ago
Record result of invocation before 'returning' it

This helps us avoid rescuing an exception raised by code elsewhere in
the Mocha code. Also, enab...

github.com/freerange/mocha - 9e449b0c79d41d7045c49a1af648dfe89edcf31e authored about 5 years ago
Reduce test's knowledge of irrelevant details

github.com/freerange/mocha - ad0fa3c12769a2c16bf6d4619308a1619c85524d authored about 5 years ago
Encapsulate invocations inside Cardinality

github.com/freerange/mocha - e58de2b8bb0141d514deee322482bf09de590b92 authored about 5 years ago
Use consistent phrasing for configured & invoked times

github.com/freerange/mocha - 290f390ebdd5398c6188671d213317d96fe2316a authored about 5 years ago
Simplify Cardinality#invoked_times

Using more expressive & concise conditionals & booleans.

github.com/freerange/mocha - 54f38b079e726ff44f9d4dcde9ebe7c81a1f2c13 authored about 5 years ago
Use same times logic for non-zero configured & invoked

github.com/freerange/mocha - 4a311184f94ace902490d3f588631327dbe55f1b authored about 5 years ago
Rename methods on Cardinality to better describe intention

expected hadn't quite sounded right because it also included allowed.

github.com/freerange/mocha - aa27319f18a95d6b40bd95644380caf0336b7b4c authored about 5 years ago
Interpolate vs append simple expressions in Expectation#mocha_inspect

github.com/freerange/mocha - b6d10dc543fb7732f8ca819da31546c4f9bca4cd authored about 5 years ago
Rename methods on Cardinality to better describe intention

github.com/freerange/mocha - e20cb8a5f13926f43521f521a55e25586a4f5e15 authored about 5 years ago
Rename methods on Cardinality to better describe intention

github.com/freerange/mocha - f87bf6c42f9646a9b20b0a5b50bbb170138dfc02 authored about 5 years ago
Cardinality#times is never invoked with 0

github.com/freerange/mocha - 09742f1829f4db7c1b27e7c7e202cf5b8c66e2f3 authored about 5 years ago
Infer invocation count from invocations size

The target is to encapsulate it inside Cardinality in a tell-don't-ask
style.

github.com/freerange/mocha - 836f85b8514c841781767c1d31e923af5074d4ae authored about 5 years ago
Create week-564

github.com/freerange/site - 5cb86bdc41fedaffddba20acc0016dadedc63341 authored about 5 years ago
Publish week-564

github.com/freerange/site - 259f9bc00ef18f6debae3956c64c3723c1854c46 authored about 5 years ago
Merge pull request #104 from freerange/dependabot/bundler/loofah-2.3.1

Bump loofah from 2.2.3 to 2.3.1

github.com/freerange/site - 0b0c5535efbbac06f30a16ba96fbc4887cf061b1 authored about 5 years ago
Add .ruby-version

So that rbenv can automatically use the version defined in the Gemfile.

I think it's OK to comm...

github.com/freerange/site - 4539d2f103f9e0ddfb5bc8a24ecebb575a568d7b authored about 5 years ago
Move invocations list to Cardinality

The target is to encapsulate it inside Cardinality in a tell-don't-ask
style.

github.com/freerange/mocha - 59454a83648f76e46918779f7dd39a34927cff2c authored over 5 years ago
Move invocation size based logic to Cardinality

Cardinality and invocations go hand-in-hand. So, the target is to move
invocations to Cardinality.

github.com/freerange/mocha - 0f1478e2f284c7b867bf4154adeabffbd367e3c0 authored over 5 years ago
Prepare to move invocation size based logic to Cardinality

Cardinality and invocations go hand-in-hand. So, the target is to move
invocations to Cardinality.

github.com/freerange/mocha - 862b08e307ead49ccf2291d1f18066b6c7728a6b authored over 5 years ago
Display matching invocations alongside expectations

First bunch of commits from #394.

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

github.com/freerange/mocha - 00f05402960995d3f8c3ac91023ed45a3e1600c6 authored over 5 years ago
DRY up acceptance test for display matching invocations

Extract the assert_invocations method. Checking that invocations follow
'satisfied expectations:...

github.com/freerange/mocha - 6ef520222d06f5988a415bc3bc9b9c214524e622 authored over 5 years ago
Reduce granularity and redundancy of tests

The tests were helpful for test-driving, but not all are needed due to
overlap.

github.com/freerange/mocha - e916363a11772a8c89cd70cdc2b6acd10eb7c3e4 authored over 5 years ago
Replace invocation_count with invocations.size

Less state to maintain. Array#size is O(1), so should be fine
performance-wise.

github.com/freerange/mocha - c11c367df2c66e814addf0f849c5fc3a9a35a622 authored over 5 years ago
Display arguments of matching invocations

Previously the expected arguments were being displayed here (using
Expectation#method_signature)...

github.com/freerange/mocha - 64724c72a3876aac055ca5d2811a46d918229a0e authored over 5 years ago
Rename block arguments when calling invocation from Expectation#invoke

github.com/freerange/mocha - 7a5fef9008dccadf7614326f04a1365483e8a513 authored over 5 years ago
Display yields of matching invocations

github.com/freerange/mocha - 976705cb41d7201e07bc1c3ce01036fea405a1bb authored over 5 years ago
Prepare to display yields of invocations

Since an expectation can have multiple matching invocations, and an invocation
can yield multipl...

github.com/freerange/mocha - d50891344bdfd09da2f7617dbc7a2cb0b0df0469 authored over 5 years ago
Move yielding to invocation

This will allow the yields to be captured and remembered by the invocation

github.com/freerange/mocha - 2a79b6cd74193b031c36cf55da223f09ccdc41cc authored over 5 years ago
Display exceptions raised from invocations

github.com/freerange/mocha - a9f16a80ab6a1ed1f4453dceb005f121a053344b authored over 5 years ago
Display return values of invocations

github.com/freerange/mocha - 7f944998bb998a9ffd21e4f155451d169fe4134a authored over 5 years ago
Bump loofah from 2.2.3 to 2.3.1

Bumps [loofah](https://github.com/flavorjones/loofah) from 2.2.3 to 2.3.1.
- [Release notes](htt...

github.com/freerange/site - 63f7d5d485abf3d4303aba2e9b28ccff6028ddd7 authored over 5 years ago
Merge pull request #404 from freerange/distinguish-object-methods-modules

Distinguish different ObjectMethods modules

github.com/freerange/mocha - 8536868997be05477a0f2696ddc02370d114fd5f authored over 5 years ago
Distinguish module defining mocha_inspect methods

Previously this Mocha::ObjectMethods module was re-opening the module
defined in `lib/mocha/obje...

github.com/freerange/mocha - 537a74229e6dd238728454c9df9b1fa81892209c authored over 5 years ago
Distinguish module defining to_matcher method

Previously this Mocha::ObjectMethods module was re-opening the module
defined in `lib/mocha/obje...

github.com/freerange/mocha - ab619c863cc3928d5a79fd7bae333ab78752605a authored over 5 years ago
Merge pull request #402 from freerange/do-not-include-method-definer-into-all-objects

Do not include method definer into all objects

github.com/freerange/mocha - cc85f7c0eb652929adbf1d506f7315ccccea7b4e authored over 5 years ago
Avoid including MethodDefiner into the Object class

Instead we pass the object into the three MethodDefiner methods.

github.com/freerange/mocha - 0da9fd49688d6699abc40e1bcff53dd62d589d6d authored over 5 years ago
Move MethodDefiner module out of Mocha namespace

Since this module is not used within the library itself, there's no need
to include it within th...

github.com/freerange/mocha - 2aa0beef2447e14a7574c10647185ff209700a46 authored over 5 years ago
Rename module in test/method_definer.rb to MethodDefiner

This should help avoid confusion with the Mocha::ObjectMethods module
defined within the library...

github.com/freerange/mocha - 9ada1983e5638ee81d0ed2edac222627351df8a0 authored over 5 years ago
Remove unnecessary require statements for test/method_definer.rb

github.com/freerange/mocha - 4498dc9e1cca225518e0e19695713f48f4efaa14 authored over 5 years ago
Deprecate requiring 'mocha/setup'

By forcing people to require the explicit integrations for Test::Unit or
Minitest, we will be ab...

github.com/freerange/mocha - 36adf880a0b9302fb5e770161c2e962e7e20fe71 authored over 5 years ago
Make signatures of {Mock,ObjectMethods}#unstub consistent

github.com/freerange/mocha - f04d4377bfd7398a3f238fda9fabd1b70e547100 authored over 5 years ago
Fix deprecation warnings added in #389

These were not namespaced and it turns out they aren't actually tested
in the build.

github.com/freerange/mocha - 2406544dc206bfad7fc9526d771f682e86f2e4d9 authored over 5 years ago
require at least one specified sequence for in_sequence

github.com/freerange/mocha - 9020248aae00303885dc6804be832714b7ddab47 authored over 5 years ago
Warn if integration using mocha/{test_unit,minitest} fails

This is a deprecation warning for the moment, but it would be good to
fail fast by raising an ex...

github.com/freerange/mocha - c6032d0bbfe6bb64295f9d98e94ff9814085154e authored over 5 years ago
Add documentation to explain how Mocha is intended to be used

It's useful for the Mocha documentation to point out the different types of Test
Double and that...

github.com/freerange/mocha - 10b8d9b27b3d320238bf74778e431100dbff2331 authored over 5 years ago
Added Gregory's image to the site

I was expecting this to show up on the alumni page, but
we don't show images of alumni. Still, c...

github.com/freerange/site - c23dcaaff62a3e0b9ed4bf12a88df16078f91f23 authored over 5 years ago
Don't over-write definition of singleton_class

Introduce stubba_class method as part of the contract between Mockery and the
object being stubbed.

github.com/freerange/mocha - e49d214a8f0f6d2bd5777e63e386f0bcd4179286 authored over 5 years ago
Document MOCHA_OPTIONS in README

github.com/freerange/mocha - 3bac52c52f8deb3b248a8d6aebf1b821a7ffbe30 authored over 5 years ago
Make yields fail when the caller does not provide a block

PR: #382 by @nitishr

github.com/freerange/mocha - e9e117e6daf5bbf3e08ed7511ede4df2c6d612bf authored over 5 years ago
Refactor: inline simple expressions to prep to add new test

Adding a new test triggers Metrics/ClassLength: Class has too many lines. So,
inlining the expec...

github.com/freerange/mocha - a7db797cf0cb249749f577f12162961052cc14ff authored over 5 years ago
fail yields when the caller does not provide a block

This is more reasonable and realistic than yielding only if a block is given.
A stub that's set ...

github.com/freerange/mocha - 455e0bbabf06d23132c0d4f96f5794b75f2a2c05 authored over 5 years ago
Simplify/consistent-ify ClassMethods#method_exists? & ObjectMethods#method_exists?

PR: #370 by @nitishr

Closes #270
Closes #362

github.com/freerange/mocha - 068d6f743d0010b153c10d92ae5b644fc27677fe authored over 5 years ago
Refactor: rename method_visibility to method_exists? to better reveal intent

github.com/freerange/mocha - 0d9400dadd8b40fe7b939505d0f091160e8f3281 authored over 5 years ago
Refactor: remove alias as it isn't much more intention-revealing than original

github.com/freerange/mocha - ca58f1289e5e8a861ff5b8878c4f48e02e1a1c6e authored over 5 years ago
Refactor: inline method as body is almost as intention-revealing as method

github.com/freerange/mocha - bf79f3b487adc97b4968aa321b4070b249fc5723 authored over 5 years ago
Refactor: delegate method_visibility to original_method_owner

Since original_method_owner is a class, it can already provide method_visibility
(through ClassM...

github.com/freerange/mocha - 5bf8be914ab15a51815c4e0a722e05984df7760d authored over 5 years ago