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

Debug message had the wrong test-unit version numbers.

0c9834da0ef803487304fa8f544cc99c7583cd34 authored over 13 years ago by James Mead <[email protected]>
Remove ruby versions with failing builds from Travis CI.

f417066f7f1b7d66cf5c72f28380675bde0cc424 authored over 13 years ago by James Mead <[email protected]>
Avoid deprecation warning for rdoc rake task.

94cf38e49663b9aa640fc1ea78bb4dbfc539369b authored over 13 years ago by James Mead <[email protected]>
Add jruby to Travis CI config.

0b1567583bac0aee3b4eda34d06a40c43d021a2e authored over 13 years ago by James Mead <[email protected]>
Introspection-based tests don't work on Ruby 1.8.6.

The amount of effort required to make introspection compatible with Ruby 1.8.6 isn't worth it, s...

592a890df11ec87394022db6190d68fcf39f690f authored over 13 years ago by James Mead <[email protected]>
Run Travis CI build on multiple versions of Ruby.

24a34993114f705c4af1f539cea1077381eb938a authored over 13 years ago by James Mead <[email protected]>
Use new metaclass gem instead of metaid to avoid clashes with Rails v2.3.

See https://github.com/floehopper/mocha/commit/f0749d6d291164cc9280aa8ba16f33d652d45fe1#commitco...

efed25fa8892afdb0d8f43801b439146a34e95bb authored over 13 years ago by James Mead <[email protected]>
We can now officially support v2.0.9 to v2.2.0 of the test-unit gem as well as v2.3.0 & v2.3.1.

I've now checked through all the changes to Test::Unit::TestCase#run.

b499ff38a232a4ae2f603b477021dd3c0beb2567 authored over 13 years ago by James Mead <[email protected]>
adds support for 2.3.0 and 2.3.1

now the green dots will be shown and each passed test gets counted

bc2feaefc648c2c8b12b14a50399978996b14020 authored over 13 years ago by Jens Fahnenbruck <[email protected]>
Some other changes were made to Test::Unit::TestCase#run between v2.2.0 & v2.3.0.

164f341c7677287636719805a2720b7d65da28a1 authored over 13 years ago by James Mead <[email protected]>
I want to be able to run rake tasks without `bundle exec`.

3ea65ca7d5c874445f4857b7f7c2b3098e807772 authored over 13 years ago by James Mead <[email protected]>
Add development dependency on the "introspection" gem which contains an improved version of the original code extracted from Mocha.

0ce0adc9f104a0ae2ddca400696c8694e85f1b93 authored over 13 years ago by James Mead <[email protected]>
Replace custom Object#__metaclass__ method with a dependency on the "metaid" gem by WhyTheLuckyStiff.

f0749d6d291164cc9280aa8ba16f33d652d45fe1 authored over 13 years ago by James Mead <[email protected]>
Remove some more artifacts from when we were generating gemspec from the Rakefile.

2d09f171fdda57ea65e017ba263d6a874c4af88a authored over 13 years ago by James Mead <[email protected]>
Use the "release" rake task provided by Bundler instead of using the Rake::XForge::Release functionality.

ef64214154347b821b89c5c10e3f5be2e6fd4449 authored over 13 years ago by James Mead <[email protected]>
Use the built-in Bundler rake tasks for packaging the gem.

* I'm assuming nobody is still using the tar & zip versions of the release, but these are not av...

c874d5177f6ac72ed237256cdb6b52785f4ce1ad authored over 13 years ago by James Mead <[email protected]>
Make the gemspec the canonical reference and stop generating it from the Rakefile.

* Use Bundler and a Gemfile to manage dependencies based on the gemspec.
* Extract version const...

2fc31098ead59a2aa9125e0a1b2686a0a3ad3c0b authored over 13 years ago by James Mead <[email protected]>
Add Expectation#throws to allow a stubbed method to use Kernel#throw.

d03843e763f4e5ceadb66bcb4c530d6c5d0cb293 authored over 13 years ago by James Mead <[email protected]>
Added configuration for Travis continuous integration.

6da1242f26b12a24c4fcf67bf5921a25bc1bc88d authored over 13 years ago by James Mead <[email protected]>
Improved test coverage around stubbing of class methods defined in different ways.

In particular, check that the hierarchy of methods defined on a class and its ancestors is uncha...

adeb8ae0189963cf3024f2b37d5348a7feaae11e authored over 13 years ago by James Mead <[email protected]>
Add further test coverage for stubbing an instance method.

Note that we should include Object & Kernel methods in the introspection snapshot to ensure they...

7dd9512a874f89b8037d7320fe7988c222f439e1 authored over 13 years ago by James Mead <[email protected]>
When stubbing an instance method that was originally defined as a singleton method, the original method should still exist after the test.

b9168b6a53ea36e25572b8d2a9cc1e5e34f0b415 authored over 13 years ago by James Mead <[email protected]>
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...

13cf27bb84be25475e08ac6579c9447d60e111fe authored over 13 years ago by James Mead <[email protected]>
Handle stubbing of a singleton method, leaving the original method unchanged after the test.

84692eb8145581fe4ae9f1079050386cf9847e18 authored over 13 years ago by James Mead <[email protected]>
Simplify test.

f2772b89d46aad0067430d1e4bf1374a4ee991e0 authored over 13 years ago by James Mead <[email protected]>
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, ...

f1d182ea33fe08cbc187df90f12013814ae59da8 authored over 13 years ago by James Mead <[email protected]>
Added a test demonstrating github issue #20

4964f5c0c27b4030c7271043999455e703eaeeba authored over 13 years ago by Nick Lewis <[email protected]>
Make MiniTest tests run with v2.1.0 changes to API.

b3c914b0eee24ed48331c8c835c7801f5e18e390 authored over 13 years ago by James Mead <[email protected]>
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...

b136041d8d460e5fc61ef8b96492db39759c7992 authored over 13 years ago by James Mead <[email protected]>
Oops. Forgot to make these changes in last commit.

6fe08197f214457ac122c49d96fdac8e17adbea2 authored over 13 years ago by James Mead <[email protected]>
MiniTest v2.1.0 doesn't change the TestCase#run method, so it's safe to use the same monkey-patch.

a85a477f47aee133f77e60ebada6760f41bb7aaf authored over 13 years ago by James Mead <[email protected]>
Fixed missprint in #unstub documentation

2b4e868d1907859cd03f407078bd8b630f7d0dd6 authored almost 14 years ago by Gleb Pomykalov <[email protected]>
Add SHA to release notes and include updated gemspec.

6f18b724c50a89a1fad954dc32a8a590dbb877ca authored almost 14 years ago by James Mead <[email protected]>
Bump version to 0.9.12 and prepare for release.

8bb523e8467626c23b271eb529c33fb118e368fe authored almost 14 years ago by James Mead <[email protected]>
Added todo item.

72c0453c051dc4b1939d82208988dd6cca403415 authored almost 14 years ago by James Mead <[email protected]>
Make performance tests work on Ruby 1.9.2 i.e. with MiniTest.

62c0188dbc1545aea7433e795eb938d78d7dd5b3 authored almost 14 years ago by James Mead <[email protected]>
Revert "Merge remote branch 'nicklewis/master'"

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

38c0dea705d83d212f96ee1afe7fcb79cfd23bd5 authored almost 14 years ago by James Mead <[email protected]>
We can declare rake as a development dependency with newer versions of Rubygems since it's only needed to carry out developer-related tasks.

4fb88aea21f12c4fb7a8b14e8b58c5d9bb6829a8 authored almost 14 years ago by James Mead <[email protected]>
Fixed whitespace.

dc2acf96ff8118a597e805d36b40b9001f8165a2 authored almost 14 years ago by James Mead <[email protected]>
Added todo item.

10da3d4ddcca860edc746d3a9c7f61f01062a9a0 authored almost 14 years ago by James Mead <[email protected]>
Merge remote branch 'nicklewis/master'

171a59dd7d0d407995da85775582cb25f232c348 authored almost 14 years ago by James Mead <[email protected]>
We were not parsing stacktraces on MiniTest errors comprehensively enough which led to test failures running under MiniTest in Ruby 1.9.2.

8e4ff31f01d73839cf1e1a7977d056fcd93d9ce0 authored almost 14 years ago by James Mead <[email protected]>
We need to provide this method, so the tests can run under MiniTest in Ruby 1.9.2.

1ae77bcff8f95e33392b25d35bec7195da33ba90 authored almost 14 years ago by James Mead <[email protected]>
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.

8e6752bf54840ab50122e555d7f62caf08e0cbe6 authored almost 14 years ago by James Mead <[email protected]>
Although it was temporarily useful, this test wasn't actually demonstrating the problem in issue 20.

201511ae7f3fad6abbb98eaba5ccb575c8474bc7 authored almost 14 years ago by James Mead <[email protected]>
Updated release notes with commit SHA.

aae7fdfdff52bb759cca74a2459ce105bba6ff10 authored almost 14 years ago by James Mead <[email protected]>
Actually use the monkey-patches for newer versions of MiniTest.

1613ed2267fef5927ea06adfdbcf512b89eadaad authored almost 14 years ago by James Mead <[email protected]>
Bumped version to 0.9.11 and updated release notes and gemspec in preparation for release.

401574261ca796573bc07110064e48bc41763b6d authored almost 14 years ago by James Mead <[email protected]>
Include newly added '.gemtest' file in gemspec files.

5f8677f351c3309f9f4a7c6982e24562e9f297ab authored almost 14 years ago by James Mead <[email protected]>
Added TODO items.

0b7df3c8464e85fcf05a18be91bad6d9e29b04f1 authored almost 14 years ago by James Mead <[email protected]>
Make testable by rubygems-test.

2c46df2ca31ebb869c1d94cfbb612074131c1f8d authored almost 14 years ago by James Mead <[email protected]>
Added a test demonstrating github issue #20

06889b55d4d89867090b976117f09924c84b56ec authored almost 14 years ago by Nick Lewis <[email protected]>
Added todo item.

cc436649221e1895b5fc392247ce108db5ba8244 authored almost 14 years ago by James Mead <[email protected]>
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.

ef4439904bb8476a661ec184a406e7f19714642e authored almost 14 years ago by James Mead <[email protected]>
Added a test case for Github Issue 20.

7f870dbc857fedb50bc986d32c8606d4fe57f722 authored almost 14 years ago by James Mead <[email protected]>
Added a todo item.

6cf8d6b3a08de8ccb7a2943885366e46671b8a67 authored almost 14 years ago by James Mead <[email protected]>
Add the ability to run a whole test case within a single acceptance test.

ff19acaa90dbed6baf3ae237f55401e0e425f0c3 authored almost 14 years ago by James Mead <[email protected]>
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.

509a046f3bee0c282727c83821b66b65d96419cf authored almost 14 years ago by James Mead <[email protected]>
Update links to my blog and make other links consistent.

9de0e619d46ba50c938fb1d24d30e931c38ebef1 authored about 14 years ago by James Mead <[email protected]>
Added a URI parameter matcher that ignores the order of query parameters so that tests can be independent of undefined hash ordering.

1ed96f77a967b497746176e0b8a46746f5b4d722 authored about 14 years ago by Paul Battley <[email protected]>
Extract method to simplify tests and reduce duplication.

80f28aa72397c814e26a1893b576e768287b3c59 authored about 14 years ago by James Mead <[email protected]>
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...

afea438fe5a85eadf2ebfd61bfd17c28393604db authored about 14 years ago by James Mead <[email protected]>
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.

2b70431de641c88308dad0e8b2943be5522218bf authored about 14 years ago by James Mead <[email protected]>
Added SHA1 for 0.9.10 to release notes.

f3973884da18da1eafa03de947f56600a3ffc9a2 authored about 14 years ago by James Mead <[email protected]>
Bumped version to 0.9.10 and updated release notes and gemspec in preparation for release.

31182ea8b38b79aa50702aa839f6a29ebcf7d684 authored about 14 years ago by James Mead <[email protected]>
Updated gemspec.

8462164183b820aae9a0c3a09fb216e6fb87e28c authored about 14 years ago by James Mead <[email protected]>
Added Mocha::ObjectMethods#unstub.

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

187eddfe487e52d12aa65dc419bce8e23b7cf201 authored about 14 years ago by James Mead <[email protected]>
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:/...

e2c5f3e06e459356a36e04a2e9959ca0f467125b authored about 14 years ago by James Mead <[email protected]>
Make ExpectationError inherit from Exception, rather than StandardError

fdcb1503906293745444d8bf49ee624fa7839f75 authored about 14 years ago by James Sanders <[email protected]>
Fixed inappropriately scoped PASSTHROUGH_EXCEPTIONS rescue.

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

625df7e68fbe900f1fe64a98df4fafea19c08db2 authored about 14 years ago by blt <[email protected]>
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.

89a334f490fc8e01d02e4a7c4ff0afbb323f0ef9 authored about 14 years ago by James Mead <[email protected]>
Add commit SHA1 for 0.9.9 to release notes.

48ab59a6fb78edafea7f1f4b0fdeadf4cda305fc authored about 14 years ago by James Mead <[email protected]>
Bumped version to 0.9.9 and re-generated gemspec in preparation for release.

ee3a79db4d52c3339e8acf07505e01236a2b4810 authored about 14 years ago by James Mead <[email protected]>
Added release notes for v0.9.9.

c0cf25b333c5accef258a87f96173e9486f8b6b4 authored about 14 years ago by James Mead <[email protected]>
Using .puts instead of Kernel#warn seems more appropriate.

2e0b80af86baf1e92c62dee0123b73335085d454 authored about 14 years ago by James Mead <[email protected]>
Fixed gemspec.

e0a00a7b2adf8f11d3679879df9a5c47a5c36189 authored over 14 years ago by James Mead <[email protected]>
Updated gemspec as requested by shwoodard.

d843a1a4233073aff51c6c9f3128df71e7e28538 authored over 14 years ago by James Mead <[email protected]>
Undo last commit. It didn't solve the problem.

d1715ffe4c85a672383088e48c2e013417bde463 authored over 14 years ago by James Mead <[email protected]>
Add one heading level in case GitHub doesn't allow an "h1".

fc4fc75ef34d98eaec052f5d029a1d283c2f2b15 authored over 14 years ago by James Mead <[email protected]>
Added braces for rdoc links to see if that makes them work on GitHub.

5fd8b204c92a66355ea96303cf089ff556ea50ca authored over 14 years ago by James Mead <[email protected]>
Use rdoc extension to encourage GitHub to use correct formatting.

Thanks to a suggestion from Rohit Arondekar (rohit).

6778ec18da47ef17a76144083b702f170b496c52 authored over 14 years ago by James Mead <[email protected]>
example shouldnt show method being called, as that would make the expectation fail

befde5c359286d110799ff1b925bc0834bcfa5b9 authored over 14 years ago by reddavis <[email protected]>
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...

cdfe7db1eeda40fc537418aabf70fc8c2662e251 authored over 14 years ago by James Mead <[email protected]>
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...

02e37c9c91222ffa296a01f20e551bc47bb201bf authored over 14 years ago by James Mead <[email protected]>
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...

22599b8bbc99f72b8c33f76df479591a129b3798 authored over 14 years ago by James Mead <[email protected]>
Handle new versions of test-unit gem (v2.0.8 & v2.0.9)

ff109bb2849cb49a92620e766bdfa4e49ed6c2be authored over 14 years ago by James Mead <[email protected]>
Fix test incorrectly failing under Rubinius 1.0.

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

668b358db281ac10362a4c04506fae716e53e687 authored over 14 years ago by James Mead <[email protected]>
Improve documentation for Expectation#raises.

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

eed5ff3a4bf673236080e5610ea24ec91b198797 authored over 14 years ago by James Mead <[email protected]>
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...

c5736db505cab18dc646d40a670213f7d3be5fbe authored over 14 years ago by James Mead <[email protected]>
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...

9a2ca1e5cc27d9e6a1d016592f62931e12f3913c authored over 14 years ago by Eloy Duran <[email protected]>
Made the unit tests run on 1.9.2dev r25249.

b7ef80234de9a2242c11634618f24470a833b906 authored over 14 years ago by Eloy Duran <[email protected]>
Fix test:performance rake task for Ruby 1.9.2.

5e962089dbed419eaf0bff9fc643217e2cb00658 authored over 14 years ago by James Mead <[email protected]>
Explicitly require rubygems for running tests via rake using test-unit gem.

565947a4f27b9b91c016306e300773dbd5d3a613 authored over 14 years ago by James Mead <[email protected]>
Add a warning if an "unverified" version of MiniTest is being used.

71bdef5ec46b16eafdc21ed2e502aaef8e56b36c authored over 14 years ago by James Mead <[email protected]>
Add patches for different versions of Test::Unit.

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

267651aa8a7decf5dd716ab182d503a880577a8f authored over 14 years ago by James Mead <[email protected]>
Added logging for Test::Unit monkey-patching as we did for MiniTest.

b5983808ccd63cc94858ddf87278685866dee923 authored over 14 years ago by James Mead <[email protected]>
Add patches for different versions of the MiniTest gem.

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

264e193fc190616615f245aeed0d3feb99837f5a authored over 14 years ago by James Mead <[email protected]>
Added a note about using explicit equals() matchers with the shorthand.

55f431a7dc0797b54ee5dbd3256ee59cbb175499 authored almost 15 years ago by Luke Redpath <[email protected]>
Added documentation to the new & | shorthand methods.

26cbd02108173a71c2cc4bcb4f7a36d90fef6a2b authored almost 15 years ago by Luke Redpath <[email protected]>
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(...

eef5f79b2e9c6cdcf5404e7ff5895198f0fcc278 authored almost 15 years ago by Luke Redpath <[email protected]>