Ecosyste.ms: OpenCollective

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

github.com/freerange/mocha.methods


https://github.com/freerange/mocha.methods

When stubbing an instance method that was originally defined as a singleton method, the original method should still exist after the test.

e19b111c4fa6b59636704a3e113eab71a87cf446 authored over 13 years ago
Improved test coverage around stubbing of instance methods defined in different ways.

In particular, check that the hierarchy of methods defined on an instance and its ancestors is u...

f32c912d3eb1ff3a7137f6e2411303454f8561f8 authored over 13 years ago
Handle stubbing of a singleton method, leaving the original method unchanged after the test.

e20e150e8c3478f4371c8d31d44cf82d9a57a716 authored almost 14 years ago
Simplify test.

c2be97467b3f45885eb2c6845ac15ee109051c2f authored almost 14 years ago
Make MiniTest tests run with v2.1.0 changes to API.

5ea2e0981dc7a439addcb0cd22c17d76e4df80b9 authored almost 14 years ago
Since the singleton method added by Mocha masks the underlying instance method, there's no need to move it out the way and then back again.

Note that this fixes Github issue #20, because the original method is left unchanged.

However, ...

7931bb0cbb01595541acafdadcd30599b830529e authored almost 14 years ago
Using the supplied "method" to match but not to actually stub & unstub should mean that we can make the "method" instances stateful in a future commit.

In fact they are already stateful in the sense that they add new methods, alias methods, and rem...

ab07ad6eef12a196cdbacaad6a607ac52e958143 authored almost 14 years ago
Oops. Forgot to make these changes in last commit.

9423f9dc97be48bbbbfa5a28cb6ab3d6e7339a6d authored almost 14 years ago
MiniTest v2.1.0 doesn't change the TestCase#run method, so it's safe to use the same monkey-patch.

32b0a5ba9e63a8e94f11f58abdd1183ace2fd6ad authored almost 14 years ago
Fixed missprint in #unstub documentation

1f2dad4a12e2da8f367eb539494b441f516d7f59 authored almost 14 years ago
Add SHA to release notes and include updated gemspec.

7d854a518693c908b903ee70cd5fdd0edaa8478b authored almost 14 years ago
Bump version to 0.9.12 and prepare for release.

9b63a380759cb30b9bf3726a04452cf73e459461 authored almost 14 years ago
Added todo item.

542c5e2757a0eb6620a0105db698c404f3c8835a authored almost 14 years ago
Make performance tests work on Ruby 1.9.2 i.e. with MiniTest.

5633250943d283e1fa2276355cd212a28ecaa44d authored almost 14 years ago
Revert "Merge remote branch 'nicklewis/master'"

This reverts commit 171a59dd7d0d407995da85775582cb25f232c348, reversing
changes made to 8e4ff31f...

6f96e372386334a87f24edb66b535cf789f8b9d0 authored about 14 years ago
We can declare rake as a development dependency with newer versions of Rubygems since it's only needed to carry out developer-related tasks.

af0b80f6946e0a3d1c71ceba9a93e55846f18ce3 authored about 14 years ago
Fixed whitespace.

824f4803090a32975636cafabda32f4f54204b0a authored about 14 years ago
Added todo item.

2bc6ad946b7b49cacd55ef30c934f4a9ee79f2d6 authored about 14 years ago
Merge remote branch 'nicklewis/master'

0017879ec26cf672e5ae0c097d27fcf6a04f0363 authored about 14 years ago
We were not parsing stacktraces on MiniTest errors comprehensively enough which led to test failures running under MiniTest in Ruby 1.9.2.

c9d90993a1ae8a1a139c6e428d2b8838483ac6a6 authored about 14 years ago
We need to provide this method, so the tests can run under MiniTest in Ruby 1.9.2.

9d773e8e0181b8f20054b3faa8e0b713f516d24d authored about 14 years ago
I'm sure it's not the best solution, but to avoid 'circular require considered harmful' warning in Ruby 1.9.2, I've moved the requiring of Mockery from Mock into the method that uses it.

a97dfff5980c41512fa636a8f0bd57b3c2501896 authored about 14 years ago
Although it was temporarily useful, this test wasn't actually demonstrating the problem in issue 20.

bb08d5005602e97c8ff08bc977a7f62c3e554989 authored about 14 years ago
Updated release notes with commit SHA.

90541828de528c040ef4a583bd22844943bb2e45 authored about 14 years ago
Actually use the monkey-patches for newer versions of MiniTest.

b8dbc3ca31c51581dff603a24c9fe1abd881f5a6 authored about 14 years ago
Bumped version to 0.9.11 and updated release notes and gemspec in preparation for release.

1b6bb399fea39a50e6cea08cb5da4b23d90684bb authored about 14 years ago
Include newly added '.gemtest' file in gemspec files.

590afc7d824069b1eb3ca13527a132a9beae6255 authored about 14 years ago
Added TODO items.

39dfd653f9537b729be9e9d07a4698d2dff78ea4 authored about 14 years ago
Make testable by rubygems-test.

f31d847297b6e940b4749a55ca387d417f8f205d authored about 14 years ago
Added a test demonstrating github issue #20

00a5211fad54e5e47bf856a30293efd7e9afa8e8 authored about 14 years ago
Added a test demonstrating github issue #20

bb4c79e028fcfab589a85c17ae8e5b8bebe3b721 authored about 14 years ago
Added todo item.

4c229487e15412d8d8b98056a6c224dcf0d2d126 authored about 14 years ago
Added explicit support for minitest v1.5.0 to v2.0.2. Also don't monkey-patch versions we don't know about c.f. Test::Unit integration.

5244f984e1704ef7aa62f775e55b0bff5a305c94 authored about 14 years ago
Added a test case for Github Issue 20.

e78f6914e520ed276a4c3c3c64a2e7875cf06556 authored about 14 years ago
Added a todo item.

f167231f283670b146f79411ec2861dafaf5e196 authored about 14 years ago
Add the ability to run a whole test case within a single acceptance test.

9d74aaaedcfcbb60c37929a15986876a78feb8c0 authored about 14 years ago
By using Test::Unit::TestCase#suite we can run all tests in the test case and not worry about their names. This will be useful when we want to run multiple tests as part of a single acceptance test.

c301d38df260fbb177c4da5a88e2551ca080147a authored about 14 years ago
Update links to my blog and make other links consistent.

41c2e24d176ba2516322178e1c141c7e07c8c202 authored about 14 years ago
Added a URI parameter matcher that ignores the order of query parameters so that tests can be independent of undefined hash ordering.

f8000c80907988581a6f9cd8947ad9114c7a4e6e authored about 14 years ago
Extract method to simplify tests and reduce duplication.

4af797e3227f44e0e1d03ee246908f1967d1f705 authored about 14 years ago
Include unexpected invocation and change the language slightly to make the failure message less confusing.

See http://floehopper.lighthouseapp.com/projects/22289/tickets/52-never-expectation-failed-twist...

53b3364ea181f068c20360a38ba81680411447c8 authored about 14 years ago
No need to create regular expression every time the BacktraceFilter#filtered method is called. See http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/66-improve-performance-of-backtrace-filtering.

25a09f310390e1768d89e5497c550d994e27a913 authored about 14 years ago
Added SHA1 for 0.9.10 to release notes.

e919adb94c571185bf5e6922e2a54b47d49af891 authored about 14 years ago
Bumped version to 0.9.10 and updated release notes and gemspec in preparation for release.

3634fad5413ffd45b15b5f0005375b745bc33576 authored about 14 years ago
Updated gemspec.

b112e908bd286f38f3e5e3a6243110144a68dd03 authored over 14 years ago
Added Mocha::ObjectMethods#unstub.

The following links are relevant :-
https://github.com/floehopper/mocha/issues#issue/6
http://fl...

1621574c60766094d5bd051df9d7b6c5600aacb4 authored over 14 years ago
Added some tests for the change in fdcb1503 where Mocha::ExpectationError became an Exception not just a StandardError.

See the following for more details :-
https://github.com/floehopper/mocha/issues#issue/15
http:/...

c8b1787998d8fc1e5d20cab1bdc79eb8d1b84b80 authored over 14 years ago
Make ExpectationError inherit from Exception, rather than StandardError

3d36c881d79e447a6a608dd1bbdd8d4bfbcdb6d8 authored over 14 years ago
Fixed inappropriately scoped PASSTHROUGH_EXCEPTIONS rescue.

In some instances the teardown function may also throw and exception meant to
be passed along to...

00bb9c3a9bcc6dc95356ec34e47636b074f8c956 authored over 14 years ago
By hard-coding the example URLs to point to the Rubyforge documentation site, we can fix the broken links on the Github README page. This isn't an ideal solution, because it means when building the documentation locally, the links will point to the live versions of the examples, rather than the local versions. But the whole thing is a bit of a mess anyway, because the README was only originally designed to be used on the Rubyforge site and not on Github. So this'll do for now.

1e48cd0c8c17aacbfd7ad2f8f306d1373047cf3b authored over 14 years ago
Add commit SHA1 for 0.9.9 to release notes.

665d3655b290e40c7be6b956b83ce71552ffe2e8 authored over 14 years ago
Bumped version to 0.9.9 and re-generated gemspec in preparation for release.

b7dd014b9c0af511c60357c9db07db8737c5da83 authored over 14 years ago
Added release notes for v0.9.9.

e3a1ff18bbe487f5dd3820f4835eb6990ce2100c authored over 14 years ago
Using .puts instead of Kernel#warn seems more appropriate.

6dd2dcdc35a4e24e156024d14b7d33463566ac96 authored over 14 years ago
Fixed gemspec.

ae9a4611275771cafd99d697aa0a6f728036163d authored over 14 years ago
Updated gemspec as requested by shwoodard.

b4df9951dae384b58d6fbfab86553ccc147f9286 authored over 14 years ago
Undo last commit. It didn't solve the problem.

8d56af675cba23fd63077175b271bc1522467d31 authored over 14 years ago
Add one heading level in case GitHub doesn't allow an "h1".

85600842ded743315990baab453314e0d7bb58ce authored over 14 years ago
Added braces for rdoc links to see if that makes them work on GitHub.

c812b0b3d2a6c657d4f400942bb503fead1269a7 authored over 14 years ago
Use rdoc extension to encourage GitHub to use correct formatting.

Thanks to a suggestion from Rohit Arondekar (rohit).

f696998df75d7ec189549568d164d059a57b17fb authored over 14 years ago
example shouldnt show method being called, as that would make the expectation fail

734a6fdd4ff030c9fba7e3a4ca121616cd8e6b6d authored over 14 years ago
Only warn when the new 'debug' MOCHA_OPTION is supplied.

I've added various debug warning statement in recent commits, but these should not be enabled by...

19984a8a4f0cc80f84ab3e224c9d318f503a3471 authored over 14 years ago
Fix exception when running rake without test-unit gem.

When test-unit gem >=v2.0.0 was installed but the "use_test_unit_gem" MOCHA_OPTION was not speci...

8a5f418cf93543925e5302c50d5ad3654b656264 authored over 14 years ago
Mocha should not load bits of the test-unit gem by accident.

This is an attempt at a fix for the problem that James Adam reported [1]. By using 'load' instea...

489781f4530ea64c87031391dfa47e27bd84374e authored over 14 years ago
Handle new versions of test-unit gem (v2.0.8 & v2.0.9)

7ce906ee26951935295a930cc71b0b9dc5b28c2c authored over 14 years ago
Fix test incorrectly failing under Rubinius 1.0.

This test imposed too many constraints. It appears that
Object#inspect legitimately calls Object...

3a9e28ccb7a71e64b421840c47ea25881f78b720 authored over 14 years ago
Improve documentation for Expectation#raises.

I've had a number of people suggesting an extension to the API
to cope with custom exceptions th...

e5d26f44ef80a918b63f36b34b6a808710dc026c authored almost 15 years ago
Explicitly require rubygems for running tests via rake using test-unit gem.

1870b876c93cc4491e256f2ec620a9abc37d848d authored almost 15 years ago
Add a warning if an "unverified" version of MiniTest is being used.

6f1c1b2f2317b03fffc68fe56493881768d6e9c1 authored almost 15 years ago
Add patches for different versions of Test::Unit.

Because Mocha effectively replaces the Test::Unit::TestCase#run
method, we need to ensure that a...

e632780f1c54367de66343390df64857a9087650 authored almost 15 years ago
Added logging for Test::Unit monkey-patching as we did for MiniTest.

e62f7684d2661cd03da81b1877f13fb26e08c247 authored almost 15 years ago
Add patches for different versions of the MiniTest gem.

Because Mocha effectively replaces the MiniTest::Unit::TestCase#run
method, we need to ensure th...

5990e0eb1ad0f0dcde03511a43e3eac179938da2 authored almost 15 years ago
Fix for Ruby 1.9.2.

It appears that it is no longer possible to subvert the protection
of a method by calling it via...

b4e9e025571a37abc943aa4de3f53899723694be authored almost 15 years ago
Fix test:performance rake task for Ruby 1.9.2.

c74a047dc0ed5c9a09f5773574fbc63d07550055 authored almost 15 years ago
Added a note about using explicit equals() matchers with the shorthand.

4956fc83babed9a0a59686a670621eed79a1982a authored almost 15 years ago
Added documentation to the new & | shorthand methods.

801f9acdb4e0f44b595499b04869a0b8558aef3f authored almost 15 years ago
Allow the creation of any/all composite matchers using & | semantics.

This provides an alternative syntax for expecting any or all matchers to
pass, e.g. foo.expects(...

ab7d5f1f85dc51fce176f1d225de2999e8c1853c authored almost 15 years ago
Hacked on James's MiniTest TestResult code to make the acceptance tests run on 1.9 HEAD.

There are still 4 failures because for some reason the backtrace line numbers
are off by one. An...

01e40b29efb9e51e4bc18864052ee9138bbaba1c authored over 15 years ago
Made the unit tests run on 1.9.2dev r25249.

a3880605c5ea27434f48a0c96ecdee1d7b945b62 authored over 15 years ago
Add commit SHA1 for 0.9.8 to release notes.

6d624f26922abdcaf9409bf60610bfb64b7f8548 authored over 15 years ago
Fixed Rails plugin which stopped working after 0.9.6. Updated documentation to reflect this fix. Updated release notes and bumped version in preparation for release 0.9.8.

ff34f6c021cf488f6b80e8ceaf0c3af1265fb7e4 authored over 15 years ago
Fix Ruby 1.9 build broken by accepting commit directly from GitHub ForkQueue.

e73782b6452ee3f4df3fba67073c1aea2a1890a0 authored over 15 years ago
Remove rdoc template incorporating google analytics from source control. The file just needs to exist locally and be ignored by source control. This should stop the warning showing up on e.g. RunCodeRun build results.

6c67b63ec903d1ae2990b4057b1cac8f0754c7c8 authored over 15 years ago
allow passing a block to Mocha::Configuration methods to only change config for the duration of the block

Signed-off-by: James Mead <[email protected]>

0f0387b3a0de64d988fe8c74323bdca8403bcece authored over 15 years ago
The RDoc template incorporating Google Analytics isn't distributed in the gem (because it is only used when publishing the RDoc to Rubyforge), so we should ensure that the rdoc rake task still works when the custom template is not available. See http://floehopper.lighthouseapp.com/projects/22289/tickets/51.

1b0168a4ffa08d2219065a560df27e33157cbce9 authored over 15 years ago
The regexp_matches matcher won't match or raise an error on empty arguments or arguments that don't respond to #=~

Signed-off-by: James Mead <[email protected]>

1fcbdbc5f26f7740a47d604e0a9e99a54b9c6f88 authored over 15 years ago
The includes matcher won't match or raise an error on empty arguments or arguments that don't respond to #include?

Signed-off-by: James Mead <[email protected]>

f90ba6a70c92b74daefeda0d4f1e199e5c988970 authored over 15 years ago
Now the has_value matcher won't match or raise error on empty arguments or arguments that don't respond to #values

Signed-off-by: James Mead <[email protected]>

c7b0a4b57901f4c478674ee5c30db40ed08b0600 authored over 15 years ago
Now the has_key matcher will not raise an error on empty arguments or arguments that don't respond to #keys, nor will it match

Signed-off-by: James Mead <[email protected]>

04a9fa81e1b02a695e5ed14a6f095eed9a68fedb authored over 15 years ago
Updated release notes for 0.9.7.

e81b1b81b98ab244177ace190dd9376817a0a1b5 authored over 15 years ago
Prepare for 0.9.7 release.

4e9d665e33da42eeccd0960258f8242e346c0ede authored over 15 years ago
Although I had provided a deprecation warning for people using Mocha::Standalone, I had assumed people wouldn't be explicitly loading the mocha/standalone.rb file. It turns out this assumption was incorrect at least in the case of Rspec. I'm bumping the gemspec timestamp so we have a candidate gem on GitHub to play with.

7bd4309caa59ae169a38dc40eceeb86cfedd0e71 authored over 15 years ago
Update gemspec and release notes to reflect 0.9.6 release.

56acf1a7f8a76da523923c6df321845f902f7963 authored over 15 years ago
Prepare for 0.9.6 release.

c2c3b11d6b0dc03c28b35fc2fcc3e76da147563c authored over 15 years ago
Merge branch 'master' of [email protected]:floehopper/mocha

262d980cc44ae8e511592c91dffbd5b67b03b718 authored over 15 years ago
By using a different delimiter we can expand these method definitions onto multiple lines to make them more readable.

e8330ee1e745db83f9fb6c5d36eced71d9480a49 authored over 15 years ago
made mocha compatible with minitest 1.4.0

Signed-off-by: James Mead <[email protected]>

a5be86827e3381a16de97a4a3bb99955233c2cf9 authored over 15 years ago
Chad Humphries pointed out that in Ruby 1.9.1, if you are not using Test::Unit or MiniTest, Mocha will attempt to load and monkey-patch Test::Unit. Mocha will now only monkey-patch Test::Unit and/or MiniTest if they have already been loaded. MiniTest tests will now run in both Ruby 1.8.6 (with MiniTest gem) and in Ruby 1.9.1 (with MiniTest std lib). See Ligthouse ticket - http://floehopper.lighthouseapp.com/projects/22289/tickets/49.

1c5bfef8c2fe17f404ce1e63e23953f1cbdd456f authored over 15 years ago
Removed Bacon integration after deciding only to maintain integration with Test::Unit and MiniTest which are both Ruby standard libraries. See mailing list for details.

6feb1e480e89cb939e9f28c8ad6e3b17a1d55791 authored over 15 years ago
Fixed bug: Some Bacon tests were failing in Ruby 1.9.1. http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/43.

c418f3e3fd36ca8d7ad65763007280167cbd0c45 authored almost 16 years ago