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

Use latest 2.2.x version of Ruby in Travis CI build matrix

Ruby v2.2.9 was released on 14 Dec 2017 [1].

[1]: https://www.ruby-lang.org/en/news/2017/12/14/...

65418eec3e42ccce4d7b83c98c309a15b155b28c authored about 7 years ago
Use latest 2.3.x version of Ruby in Travis CI build matrix

Ruby v2.3.6 was released on 14 Dec 2017 [1].

[1]: https://www.ruby-lang.org/en/news/2017/12/14/...

883fdc6d6a68a0a37c081e97fd695be1ad9b3c2c authored about 7 years ago
Use latest 2.4.x version of Ruby in Travis CI build matrix

Ruby v2.4.3 was released on 14 Dec 2017 [1].

[1]: https://www.ruby-lang.org/en/news/2017/12/14/...

586da3df8fcedfb0a058e0b9a60fa4a2e9368fcf authored about 7 years ago
Add Ruby v2.5.0 to Travis CI build matrix

This version was released on 25 Dec 2017 [1]

[1]: https://www.ruby-lang.org/en/news/2017/12/25/...

b5d0deb0f2c45b4fa09da8fa4d49aaa451aa5f13 authored about 7 years ago
Specify exact version of JRuby to use on Travis CI (part 2)

In a further attempt to fix broken JRuby builds as per this recommendation [1].

[1]: https://gi...

065cacd6e6b87d9852a6740393d3cdba3570773f authored over 7 years ago
Specify exact version of JRuby to use on Travis CI

In an attempt to fix broken JRuby builds as per this recommendation [1].

[1]:
https://github.co...

306281e1900ab0d82c8511eb449d70b65010db94 authored over 7 years ago
Merge pull request #309 from freerange/fix-deprecation-warning-for-assert-nil-in-class-method-test

Fix deprecation warning for assert_nil in ClassMethodTest

73af6007aaa994a2d9fa13092689d25c0418e71c authored over 7 years ago
Fix deprecation warning for assert_nil in ClassMethodTest

These unit tests are pretty horrible and this one in particular didn't
seem to be testing anythi...

55bccde91e3d9959508ebcdc10e27eb45ac401ea authored over 7 years ago
Fix apostrophe in RELEASE.md

2fc010835fde0bc671b6a2f54d3760b53f453994 authored over 7 years ago
Prepare to release v1.3.0

This is a minor release, not just a patch release, because it introduces a
couple of new depreca...

9d91ee640d063275ea383629862407611d3bc3a7 authored over 7 years ago
Merge pull request #294 from freerange/expand-module-test-definitions

Use do/end instead of { } in stub_module_method_test

0cf70e36b071c390a3f4bfa9c18c39886e18eeda authored over 7 years ago
Use do/end instead of { } in stubbing_on_non_mock_object_test

This is consistent with the way we're defining modules and classes in
other similar tests. I als...

e48ce8ed5120d08975c4c263c5dabf24cec7bcca authored over 7 years ago
Use do/end instead of { } in stubba_test_result_test

This is consistent with the way we're defining modules and classes in
other similar tests. I als...

690e5761349c40d39ad107ca4032f63e12e27fcf authored over 7 years ago
Use do/end instead of { } in stub_module_method_test

This is consistent with the way we're defining modules and classes in
other similar tests. I als...

a3f0e14851f43276640219680ccf1f3065428ee0 authored over 7 years ago
Merge pull request #307 from freerange/rename-has-equivalent-query-string

Rename Mocha::ParameterMatchers::QueryString -> EquivalentUri

fe23b302b08fe8883de2a296cad77a903c830036 authored over 7 years ago
Simplify Mocha::ParameterMatchers::EquivalentUri#explode

By using `CGI.parse` to convert query string into `Hash`.

f11f30408d9760a11532ffab4fbc9769db873b8b authored over 7 years ago
Rename Mocha::ParameterMatchers::QueryString -> EquivalentUri

And `Mocha::ParameterMatchers#has_equivalent_query_string` ->
`#equivalent_uri`.

Also deprecate...

64d18423306adb12ec02aeeabe06d3ea10e6b3ee authored over 7 years ago
Merge pull request #304 from freerange/query_string_blank_value

Handle blank parameter value for query string matcher

0e5f6093218b198fdd5b759d90475aeb481314f5 authored over 7 years ago
Handle blank parameter value for query string matcher

c72472b87d0d59775d5fcd0d11f3106016bfa07d authored over 7 years ago
Merge pull request #306 from freerange/rename-query-string-matches-to-query-string

Rename QueryStringMatches to QueryString

728bead73b93037c264ab29c62a96d3705a91759 authored over 7 years ago
Merge pull request #305 from freerange/use-faster-container-based-travis-ci-builds

Use faster container-based virtual environments for Travis CI builds

28bbdb5b720a6f677ee89718d8aa61711a47f058 authored over 7 years ago
Rename QueryStringMatches -> QueryString

This feels more consistent with the other parameter matcher class names
and with the existing fi...

779eef13953c56be3deb23ecb8e90d7883f5ad75 authored over 7 years ago
Convert some acceptance tests into unit tests

The acceptance tests should just check that everything is wired up OK
using a small number of ty...

dbebd7137dd07c7af6e6c6e81c7aac2ae41297ee authored over 7 years ago
Merge pull request #302 from timcraft/fix-includes-parameter-matcher-for-array-values

Fix `includes` matcher for `Array` values

dd2d72c45947e48f2e3bce43dbbdbd6031cbb54c authored over 7 years ago
Change Travis CI sudo option from required->false

`sudo: required` is the default for repositories before 2015 [1].

Builds for repositories with ...

ca68abbcb05c99927036b496e3ba9175a833cf88 authored over 7 years ago
Fix `includes` matcher for `Array` values

The following code works with mocha v1.1.0:

MyClass.any_instance.expects(:my_method).with(i...

4c2f5f5bb74a7def18896cf7441cda3d89b81cad authored over 7 years ago
Fix 'Backers' heading in README

cedcd94ebbad2adedfd72300e4bcca4660afb216 authored almost 8 years ago
Merge pull request #297 from junaruga/feature/travis-add-ruby24-and-ruby-head

Add Ruby 2.4 and ruby-head in .travis.yml

0faf44fce34d721a0ee095ed4c2edb700ee1bfa5 authored almost 8 years ago
Add ruby-head to Travis as allow_failures.

* allow_failures is because it's good to know new version Ruby's issue
as faster before the re...

1aee6c90b409a4f9aa10edccae17f85d335d4c83 authored almost 8 years ago
Add Ruby 2.4.0 to Travis.

d28dc257aa43046f2554933bd545cfea370270d7 authored almost 8 years ago
Convert all existing MAJOR.MINOR Ruby versions for a issue.

Refer https://github.com/travis-ci/travis-ci/issues/7077 for the issue.

6245a89f63ca5259972c6866b11852fe5417eff9 authored almost 8 years ago
Add a known issue to README for Ruby bug 12876

See #276 and the Ruby bug report [1] for more details.

[1]: https://bugs.ruby-lang.org/issues/1...

3e202adb0a647e7e830d620864dd0f90488ab58a authored about 8 years ago
Merge pull request #290 from freerange/deprecate-passing-block-to-mock-object-constructor

Deprecate passing block to mock object constructor

a7bc1b53ace895503b4b5d4915382aead4632e3e authored about 8 years ago
Deprecate passing block to mock object constructor

This mechanism is confusing, because the block is evaluated in the
context of the newly instanti...

9316807e5922ef1942160889dabdabb862d5107b authored about 8 years ago
Clarify context of block passed to API#mock & API#stub in docs

This is to address the confusion experienced by @ggaston095 in #286.

I've chosen to use two "@y...

39eef73b0216ce70a1107001885f6e3a7daeaab7 authored about 8 years ago
Fix remaining Ruby v1.8.7 builds in the Travis CI matrix

The fix in the previous commit [1] seemed t work [2],
so apply it to all the other Ruby v1.8.7 b...

460dce5b9e0adc3f840fb41383a7f7f899b881b0 authored about 8 years ago
Another attempt at fixing Ruby v1.8.7 builds

Based on the comments in this Github issue [1].

[1]: https://github.com/travis-ci/travis-ci/iss...

928b5a402c620e3277de17658050eb170fd2b0e3 authored about 8 years ago
Revert "Use Ubuntu Precise vs Trusty for Ruby v1.8.7 builds"

This reverts commit a3deac36416a4be0d0ef9f06c3fc638b9d116d84.

This attempted fix didn't work [1...

fb348ac6e895b68618894246b52e3e926514988a authored about 8 years ago
Use Ubuntu Precise vs Trusty for Ruby v1.8.7 builds

Travis CI is now using Ubuntu Trusty (v14.04) by default. However,
it appears that rvm cannot in...

a3deac36416a4be0d0ef9f06c3fc638b9d116d84 authored about 8 years ago
Merge pull request #288 from freerange/add-jruby-to-build-matrix

Add latest stable version of JRuby to Travis CI build matrix

2e67044e50ac10705db25f0c55dab1d38ed2bf06 authored about 8 years ago
Add latest stable JRuby to Travis CI build matrix

2cdef343c1dbac5ca48b8bb2cb70278b1cb65507 authored about 8 years ago
Exclude JRuby stacktrace lines in ExecutionPoint analysis

0bc1b9c69cf0c50651c02980f7c375f1f1a5542a authored about 8 years ago
Extract ExecutionPoint#first_line_of_backtrace

Thus reducing duplication.

6801cd66f84d8ee99420dc8316b821e8c3fe9cd6 authored about 8 years ago
Reduce risk of hitting bug 12832 in Ruby v2.3

Fixes #277.

This mirrors the change to `ClassMethod#hide_original_method` in
6f1c8b9b6aa4253c8a...

eca7560cf19f77cded0cf1f434487e48008d2a65 authored over 8 years ago
Remove InstanceMethod#method_exists?

This was made redundant by e87c03b068efc48267fbcd5a295514077c52b901.

Commit 5f768de62a6b6fb2c1c...

8f58eddf0ff658ad255cf60cedab3c767bbb15c7 authored over 8 years ago
Require at least Ruby v1.8.7

This is the earliest version of Ruby available on Travis CI and
based on some initial investigat...

3e20be8e0d8289b47c2194c8fe0951d8e2a13b93 authored over 8 years ago
Ensure code snippets appear correctly in README

3c664df7d33c8ef6bbec937d9f4cb726aab57a18 authored over 8 years ago
Add release information to README

James made these notes when preparing the most recent release(s). We've
agreed to put them in th...

70a5febd97bb2005dd8ca5ac663ba29b53399a74 authored over 8 years ago
Merge pull request #223 from freerange/fix-mocha-inspect-on-strings

Simplify implementation of String#mocha_inspect.

1106feb47c5075c2e1d42f12d8425f851f99c1ed authored over 8 years ago
Simplify implementation of String#mocha_inspect.

This is an alternative attempt at fixing the problem identified
and addressed in #215 regarding ...

f187d30a4815167a8fce9e825239678e2041a659 authored over 8 years ago
Correct RSpec section of the README.

rspec-rails knows nothing about mocha; the mocha adapter is in rspec-core.

0cc039c89b14b3f5dd6d66eca7b560b3cd3d08c0 authored over 8 years ago
Update Travis CI build status badge - show master branch status

[ci skip]

Fixes #264.

Previously this seemed to be showing the status of the last build, even
...

39c4db6696b03fa70cadebe3136092062bf4bc39 authored over 8 years ago
Merge pull request #267 from freerange/ensure-all-tests-run-individually

Ensure all tests run individually

ccbdbc98f4f3164b0820ea88f4dbb028c4a25ae3 authored over 8 years ago
Fix failures in class_method_test under 1.8.7/1.9.3

I was seeing the following 3 failures when running the tests in this
test case:

1. test_should_...

bfd1b3413e7c85518d145cf2844667352529d40b authored over 8 years ago
Fix failing tests in class_method_test

I was seeing the following 2 failures when running the tests in this
test case:

1. ClassMethodT...

14982c2868b481a7bbd6f8f0c57b2fa7e6fef82f authored over 8 years ago
Fix failing tests in any_instance_method_test

I was seeing the following 2 failures when running the tests in this
test case:

1. AnyInstanceM...

55417f964e6c9cf53f78b2f3b17399034c0069d8 authored over 8 years ago
Add a known issue to README regarding #272.

[ci skip]

25ffe21fc8f2b00e82327e788045fee79f5beb3e authored over 8 years ago
Prepare to release v1.2.1

8186b86b9ea414316f138585b22c8d47a1b91292 authored over 8 years ago
Workaround bug 12832 in Ruby v2.3

The Ruby bug [1] is only triggered when we try to get hold of a
reference to the method being st...

6f1c8b9b6aa4253c8a990befcb89648f09512242 authored over 8 years ago
Ignore tmp directory

f0493f3c457dad0bf553afe5a2958e0eac123b17 authored over 8 years ago
Merge pull request #263 from freerange/add-ruby-2-3-to-travis-build-matrix

Add Ruby 2.3 to Travis config

8d8e729f5efe48106e9dd7020cf8146280ea6537 authored over 8 years ago
Add Ruby 2.1 to Travis build matrix

4d53b92e413c5a7cb311e991087c9e1cf82f637b authored over 8 years ago
Add Ruby 2.3 to Travis config

It makes sense to test against Ruby 2.3 given that it's the current
stable version.

6f57974c6d318c05a4746463386fdd3b1fb0dc8b authored over 8 years ago
Add Ruby 2.2 to Travis build matrix

ca2c4828f3ec81c810c843e65661e0f25f4f192d authored over 8 years ago
Add Ruby 2.3 to Travis build matrix

484a6068a6dc65ca82720af22676632f44d0d4b5 authored over 8 years ago
Prepare to release v1.2.0

Fixes #271

fdbbc058eb15f11681208dccf86510e8d920982e authored over 8 years ago
Merge pull request #262 from freerange/improve-stub-any-instance-method

Improve AnyInstanceMethod#hide_original_method

ae3d6d891bc1130d9aff271784c1a672d1432416 authored over 8 years ago
Use prepended module to stub AnyInstance methods in Ruby 2+

This is the same as the change made to `ClassMethod` in
43d56671944bd0c61e93eee89f67eb2d1736574e.

14b8928b060ddd4e6c730a249158690f0ddfa31f authored over 8 years ago
Simplify logic in AnyInstanceMethod#hide_original_method

This is the same change that was made to `ClassMethod` in
e87c03b068efc48267fbcd5a295514077c52b9...

38d902ade4d4db9888e93682aa689c9ce0892b6c authored over 8 years ago
Merge pull request #266 from freerange/fix-minitest-result-errors

Fix minitest result errors

74b4ca23b64073f2ca1e6e73e4d444406b903b6d authored over 8 years ago
Display underlying exceptions in TestRunner#assert_passed

Fixes #250.

Although the way they are now displayed isn't great, at least they
are now actually...

43fd8d78cda9473759bb63b998f06800b391ab03 authored over 8 years ago
Be more specific in separating Minitest errors & failures

Minitest::UnexpectedError is a sub-class of Minitest:Assertion and so
previously all the errors ...

e82e2290a4b0883da343b9ede7711ed202872a37 authored over 8 years ago
Fix typo in assert_method_visiblity

35ba8d715a1c9df05dab8ae9926c729bf25c8a19 authored over 8 years ago
add tests for method visibility

Add assertions to ensure that we're correctly setting the visibility of
stubbed methods when tho...

5f768de62a6b6fb2c1c275b5830bc6471722cce4 authored over 8 years ago
Add another known issue to README

2c6420966b7533d373cc7ac40d87fbc9bbb430c0 authored over 8 years ago
Add test for stubbing class method defined on module & aliased

This test was derived from the tests in #244 and was failing before we
moved to always (in Ruby ...

c3af31b154256e6f5a87300af9f7a77f639c2e58 authored over 8 years ago
Always use prepended module stubbing mechanism for Ruby v2+

Previously we only used this mechanism when there were any prepended modules.

Having just chatt...

43d56671944bd0c61e93eee89f67eb2d1736574e authored over 8 years ago
Check all accessible methods when asserting visibility

We're planning to use the prepended module stubbing mechanism more widely for
Ruby v2+. This mea...

a4ba95bb04995721e3f46423a86ffbf0e4a9f079 authored over 8 years ago
Avoid exception in older version of Rubygems

In version 1.8.23.2 of Rubygems passing `RUBY_VERSION` to
`Gem::Version.new` results in the foll...

78d930a7e724319904a87abf24d85033b024cdfd authored over 8 years ago
Merge pull request #254 from alexcoco/patch-1

Fix typo in docs for equals

6d2281ad793c07c7e3e5c55f8504003ae9df2f5b authored over 8 years ago
Fix typo in docs for equals

The docs say that an exception is raised because `method_1` is not called with an object that eq...

3062be42c5068ed0633833b3e3f962b509f8735c authored over 8 years ago
Merge pull request #253 from piamancini/patch-1

Added backers and sponsors from OpenCollective

d45b1c2be81da6e7dcb9caea50ca8897f5d6d356 authored over 8 years ago
Added backers and sponsors from OpenCollective

now your backers and sponsors will automatically appear on your readme.

7a1a58d9b8760987f488e6404609e931e060f009 authored over 8 years ago
Rename local variable __metaclass__ to metaclass

The underscores are only really necessary for the method that is called on
`stubbee` and they hi...

c53fdaa00687961916ec19d1e6b427a93a595cc3 authored over 8 years ago
Simplify logic in ClassMethod#hide_original_method

This commit replaces `ClassMethod#method_exists?` with `#method_visibility`. The
latter still re...

e87c03b068efc48267fbcd5a295514077c52b901 authored over 8 years ago
Split long line into multiple lines

6442acf2ae85c34af15b5b9271baf0379e549966 authored over 8 years ago
Extract Ruby v2.0+ version check into constant

Reduces duplication.

2dcfd6773ee5de23de7f2d3af2094279e51a3f49 authored over 8 years ago
Extract Ruby pre v1.9 version check into constant

Reduces duplication.

353877c471944579c62da2acb733eef4493b6b75 authored over 8 years ago
Make tests for Ruby version more consistent

This is the equivalent condition we are using elsewhere in the codebase.

9542b162204bbb56cf5d1a3ab4c9c0ec03add62e authored over 8 years ago
Constrain latest version of test-unit in CI builds

Later versions of test-unit cause an error like this [1] with Ruby v1.8.7.

While this isn't the...

d2808991ea5bcda3095c572c143b737ea90434d5 authored over 8 years ago
Use the latest bundler in Travis CI builds

This is an attempt to fix failing builds like this one [1].

[1]: https://travis-ci.org/freerang...

0e3eed1475c2c722940c74d31a597252e7872dbe authored over 8 years ago
Make bundler install output on Travis CI more verbose

I'm hoping this will shed some light on build failures like this one [1].

[1]: https://travis-c...

7e1c2bf8f8a2a8e6670375ac5321471b5b917892 authored over 8 years ago
Newer versions of Rake require Ruby v1.9.3 or later

This is an attempt to address this CI build failure [1].

[1]: https://travis-ci.org/freerange/m...

881611ddb1ce888b29119519d71d3aa1cfc56d0c authored over 8 years ago
Fix documentation for #stub method

599b1dcd3381945d01981d7f99f43aa0e545af12 authored over 9 years ago
Extra debug output & exception message in MonkeyPatcher.

This partially addresses #220 in that the exception raised in #219 would now be

Unable to m...

036b2d37b4305e355fbcb373ed11132525e94cf7 authored almost 10 years ago
Added section about using Mocha with RSpec & Rails.

Fixes #221.

9a9c82cd01b8973c0ff51a6d6663141fb9903aaa authored almost 10 years ago
Remove Test::Unit development dependency.

I'm not convinced this dependency which was introduced in [1] is actually
necessary.

[1]: ce3a2...

7fd79561c44381ea56d12243190d22d922d97bce authored almost 10 years ago
Explicitly support matching `Hash` parameters with `includes`.

The normal `Hash#includes?` method is a synonym for `has_key?`; this
would've been the existing ...

ff8ce3817ee1ee8181a586ac4c7f56a28b0e4c46 authored almost 10 years ago
Add explicit tests for `includes` matcher with `String`s

Previously, the `includes` matcher would work with any object that
responds to `include?`, which...

2e5481f37ee06faf2cae4559a5eee5f9ac5a361b authored almost 10 years ago
Allow `includes` matcher to take matcher arguments.

We should be able to created a matcher of the form:

object.expects(:foo).with(includes(has_...

f166fa9e64fa04eb649e108615e7a34320247310 authored almost 10 years ago