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

Tweaked rdoc for Expectation#never.

487674844c0e79476d79ce0dce3f7e84adb1ba5c authored over 17 years ago by James Mead <[email protected]>
Added bug to todo list.

b8ad316ed3494b412b71715ad9e79b4d5bedcfa2 authored over 17 years ago by James Mead <[email protected]>
Renamed YieldParameter related classes.

40a48e64fe1da365fa8370eb51ff9648d78d0f24 authored over 17 years ago by James Mead <[email protected]>
Added Expectation#multiple_yields to allow a mocked or stubbed method to yield multiple times for a single invocation.

0119a6f08d1d0cb5cd92ed3e96c7d3d21d1ba727 authored over 17 years ago by James Mead <[email protected]>
Use implicit reference to class instead of explicit reference.

afe7146b1bf74c0d55df0c71b6c0ef661d9f8217 authored over 17 years ago by James Mead <[email protected]>
Allow multiple calls to yields on single expectation to allow yield parameters to be specified for consecutive invocations e.g. mock.stubs(:method).yields(1, 2, 3).then.yields(4, 5). Updated rdoc accordingly. Extracted logic into YieldParameters class.

a5543b0a5eb9ace473aad8709bba7d19069454db authored over 17 years ago by James Mead <[email protected]>
Use implicit reference to class instead of explicit reference to improve maintainability.

405a391b6c6f48e7abcbbae6bfd23e0c50756102 authored over 17 years ago by James Mead <[email protected]>
Deleted line rendered unnecessary by previous commit.

f4abeecdcd5d2a405e419cb09d2c61bc8937ad5f authored over 17 years ago by James Mead <[email protected]>
Simplified instance variables for parameters to be yielded.

cda72be517453a6e235ce957bca9cf0dc2d90232 authored over 17 years ago by James Mead <[email protected]>
Updated rdoc on Expectation to reflect recent changes.

ca8181e45ed8a93df83904911add473e49384447 authored over 17 years ago by James Mead <[email protected]>
Refactored return value generation into new ReturnValues, SingleReturnValue and ExceptionRaiser classes. Allow multiple calls to Expectation#returns and Expectation#raises to build up sequence of responses to invocations on the mock. Extracted aliasing of Object#is_a? into a separate file so it could be required from two places. Added syntactic sugar method Expectation#then to allow more readable expectations e.g. mock.stubs(:method).returns(1, 2).then.raises(Exception).then.returns(4).

bee7cd6cfcf6289b81cb8da549fa39045ce3ca22 authored over 17 years ago by James Mead <[email protected]>
Updated todo list to reflect recent changes.

9bf7931a28165f9e76396720565978e5fd9653e8 authored over 17 years ago by James Mead <[email protected]>
Stop matching expectations when maximum number of expected invocations is reached. c.f. JMock v1.

843b981736dbef8ce3ba3cbfa30ff8cb0cd256e3 authored over 17 years ago by James Mead <[email protected]>
Separated stub and missing_expectation into different files. Ditto for associated tests.

151da8b3a151fdd2d42312dce82590b583948b73 authored over 17 years ago by James Mead <[email protected]>
Moved tests into correct test case.

b9ae38d47994e33525e932180b56fbd67249a03a authored over 17 years ago by James Mead <[email protected]>
Improved instance variable names in expectation.

2442f11de773b6f6083b13fe3a4a94933d141b9f authored over 17 years ago by James Mead <[email protected]>
Capture standard object methods before mocha adds any.

35b4b2c6a9546d0a259b11edc7f55d73c489fcf3 authored over 17 years ago by James Mead <[email protected]>
Added Expectation#once method to make interface less surprising.

3cd7473d163496fdc77b8dc12704ee0a4afc0aaf authored almost 18 years ago by James Mead <[email protected]>
Fixed integration & acceptance tests so they can find test_helper and run within TextMate.

e5d669fd3d03bc26c93cb8e26f63d5ab27a4799e authored almost 18 years ago by James Mead <[email protected]>
Move acceptance tests into their own directory.

58cd67f3d20d566a33f810b218863f0cf8b26760 authored almost 18 years ago by James Mead <[email protected]>
Move integration tests into their own directory.

0aa2ef5cce87892d2e25770ef30d6bfe9f829346 authored almost 18 years ago by James Mead <[email protected]>
Renamed test/mocha to test/unit.

9b3a4f677492a4714ca1de926aa4d252ac203104 authored almost 18 years ago by James Mead <[email protected]>
Use Rake::TestTask to run tests. Created three separate tasks to run unit, integration & acceptance tests. Split inspect_test into one file per TestCase. Deleted superfluous all_tests file.

9b16c5a705ee6496fbe68ff3eda2c1b3170f5820 authored almost 18 years ago by James Mead <[email protected]>
Fiddled with mocha_inspect and tests to give more sensible results on x86 platform.

2fc1253ba822343b534568b3edfed2a8e65e934a authored almost 18 years ago by James Mead <[email protected]>
Small improvements to RDoc.

d9f9ee6c167ba60711d9b67d9e338e351d43385b authored almost 18 years ago by James Mead <[email protected]>
Amalgamate MockMethods module into Mock class as it is no longer used anywhere else. Small improvements to RDoc.

4303d5f84de06ba9251105bb732785b0bc75cce0 authored almost 18 years ago by James Mead <[email protected]>
Removed todo item that was completed in previous revision.

2ae456971031fc003892804772fb666f9f2c4652 authored almost 18 years ago by James Mead <[email protected]>
Removed unnecessary require for rails plugin. Not needed with more recent integration with test/unit.

42d9abd6902cf28d1f37cca1c188d6bf0e189066 authored almost 18 years ago by James Mead <[email protected]>
Fixed bug [#7834] infinte_range.rb makes incorrect assumption about to_f logged by James Moore.

47b774b17debe9a8bce89c1fcc9074a2577a69d1 authored almost 18 years ago by James Mead <[email protected]>
Expectation should match if method name matches and either parameters match or with block returns true.

b119692e1afb75d199596d829133b64d6eafab10 authored almost 18 years ago by James Mead <[email protected]>
Add todo item

f48ecfff0519a28966a63f08f383aae4aa513734 authored almost 18 years ago by Chris Roos <[email protected]>
Added todo.

7fb50b46fa27fa0778dfced5724ab3197554fd45 authored almost 18 years ago by James Mead <[email protected]>
Updated RELEASE for 0.4.0. Tweaked TODO.

f9fefd2e5da3e2ba288debd983e554d99e1facbb authored almost 18 years ago by James Mead <[email protected]>
More todos.

063d1e3f544792c590d374fa7be0c42c426a1d70 authored almost 18 years ago by James Mead <[email protected]>
Update version to 0.4.0. Tweaks to todos.

100c9d878dd5257f4d26bc9a1a42d79e5664aba6 authored almost 18 years ago by James Mead <[email protected]>
Updated README in preparation for release 0.4.0.

a7859b5121620dcdaf9b049c401df7bc153c5708 authored almost 18 years ago by James Mead <[email protected]>
Sifted todos and organised them into groups.

598daa50fd885d8d3412b9b253f2ee996cbc46c9 authored almost 18 years ago by James Mead <[email protected]>
Deleted redundant test in stubba_acceptance_test. Now tested by better tests in stubba_integration_test.

afbbbbefeb8ad8cf70a5c810b165419b64cc1c70 authored almost 18 years ago by James Mead <[email protected]>
Removed unused empty test file.

6d7684cf25e29debc2d541531c4d90287b43d1b0 authored almost 18 years ago by James Mead <[email protected]>
Added tests to check that instance methods on partial mocks are restored to original implementation in case a partial mock instance is used in multiple test methods (see emails from Kevin Clark regarding tests on Rails routing code - http://rubyforge.org/pipermail/mocha-developer/2007-January/000177.html).

7e8c046dc11700b5d3c90236b95c0e26849da221 authored almost 18 years ago by James Mead <[email protected]>
Allow mocking and stubbing of methods defined on Object including 'expects' and 'stubs'.

8afd258a97fc40a0d6881fff6d507f9d208a0fac authored almost 18 years ago by James Mead <[email protected]>
Added todo items.

d9bce1814a8e373f23e3d1e3643a7421e6afac29 authored almost 18 years ago by James Mead <[email protected]>
Define and use Object#__is_a__ instead of Object#is_a? so that it can be mocked.

44e6137acb419816417c34944869553a6904c6ae authored almost 18 years ago by James Mead <[email protected]>
Find unique_mocks from stubba_methods using Mock#__id__ and not Mock#id, Mock#object_id or Mock#hash, etc.

4c6add916ebc73836b54f798d789135157feec93 authored almost 18 years ago by James Mead <[email protected]>
Add metaclass_test to all_tests and make asserts more robust.

759ea62f4a60b3a79175f218ffb3dbe730b84859 authored almost 18 years ago by James Mead <[email protected]>
Added test for Object#metaclass.

efd6b035158e52dc259bcb1531fd6068649e0407 authored almost 18 years ago by James Mead <[email protected]>
Tidied up Mock class. Don't delegate to Object#mocha_inspect for Mock#mocha_inspect so that we don't run into problems when mocking #inspect method. Remove __mock_name accessor which was only needed for testing.

3b3136ecd40a224ba8083bf6872f8eed513c164f authored almost 18 years ago by James Mead <[email protected]>
Use Object#__send__ instead of Object#send so that Object#send can be mocked.

4b3273927ceddb2705d682c3b5ed1fed090d0ed4 authored almost 18 years ago by James Mead <[email protected]>
Use Object#__id__ instead of Object#object_id or Object#id for inspecting objects, so that these methods can be stubbed.

0807d8d1685ca6f1af27b713c612be8b37b7e493 authored almost 18 years ago by James Mead <[email protected]>
Fixed rdoc for MockMethods#stubs.

0f07c187bb0556c37a6451c60816860309c7d836 authored almost 18 years ago by James Mead <[email protected]>
Renamed Object#metaclass to Object#__metaclass__ to keep it out of the way.

71d3e72a543270aec899d48473fd82056c748ab0 authored almost 18 years ago by James Mead <[email protected]>
Patch from Tobias Lutke to reverse order in which expectations are matched, so that last expectation is matched first. This allows e.g. a call to stubs() to be effectively overridden by a call to expects(). c.f. JMock.

a89c5eca75e793af70742216e7dfac5b18a5248e authored about 18 years ago by James Mead <[email protected]>
Fix path to lib/mocha/object.rb in rdoc generation rake task - thanks to Tomas Pospisek for patch.

b30b416a479687edf91158bbb4c729e9f52349e0 authored about 18 years ago by James Mead <[email protected]>
Changed Rakefile to include examples dir in packages.

0e605eecb6b2e3d7f97c757ddb3728a1c17edf41 authored about 18 years ago by James Mead <[email protected]>
Object#mocha_inspect now shows object ID in hex to imitate Ruby's own inspect.

5c4c6c2ae3d83eb6ec7c784be8340e8699536f9c authored about 18 years ago by Paul Battley <[email protected]>
Raise the same object passed to Expectation#raises if we omit the optional message

c9fc4e1ff8c590fb86833ec9ac4754fd90de3e22 authored about 18 years ago by Chris Roos <[email protected]>
Fixed bug where mocha/standalone was being required by mocha instead of mocha_standalone. This caused mocha/object not to be loaded among other things which meant methods like expects() and stubs() on objects stopped working.

22634b83805ae0337f6fe4c1b25d9bcff756719d authored about 18 years ago by James Mead <[email protected]>
Removed last references to test unit code.

4486de24232fc1d5e06ea35e9ef5c630745c6a52 authored about 18 years ago by James Mead <[email protected]>
Replaced backtrace filtering to remove another dependency on test unit.

e1fe82b358db77b00db65b318a0e7a85b2b945dc authored about 18 years ago by James Mead <[email protected]>
Mostly isolated mocha code from test unit code.

3ac42fb5d945fc588da44733f22de245e9d0eb4c authored about 18 years ago by James Mead <[email protected]>
SmartTestCase module amalgamated with Mocha module.

02326175eea6fe33f770b40137237a46765cb9cd authored over 18 years ago by James Mead <[email protected]>
Stubba module amalgamated with Mocha module.

a7026a696424f913f855ad891948a8302a732ec2 authored over 18 years ago by James Mead <[email protected]>
Substitute all non-word characters in method names when generating hidden method name.

434b28393b0c4e07ce996f6959ec335d09dcde83 authored over 18 years ago by James Mead <[email protected]>
Moved all classes into mocha directory.

1a23bf045ba41125a45c4b49995e7433084aa46c authored over 18 years ago by James Mead <[email protected]>
Bugfix: attempting to stub a method with = in its name would cause a parse error.

fd5deb20e56b14518556abd42d1baeb3ca7cd0a5 authored over 18 years ago by Paul Battley <[email protected]>
revert silly stuff with stub_everything

e4459d342c9532a738b8a15ac25106abef32496b authored over 18 years ago by James Mead <[email protected]>
stub_everything now returns stub_everythings.

a2225741bff48a0f9ff3422c56f0ecf46a881441 authored over 18 years ago by James Mead <[email protected]>
Patch to InstanceMethod from Chris Roos - fixes problem when stubbafied object hangs around between tests.

7946e49c9976930d644408e1c5b677a5acdbec51 authored over 18 years ago by James Mead <[email protected]>
Patch from Xavier Shay to eliminate warning: instance variable @yield not initialized.

6796a9df95190eb1dbaa34fbfe51f3cede96c5e8 authored over 18 years ago by James Mead <[email protected]>
Quick fix for blank mock problems.

63aafe74814fc6ab21fef4566f9960283fa4ce02 authored over 18 years ago by James Mead <[email protected]>
Keep a couple more object methods in mock to ensure revieworld tests pass - needs more investigation.

0f073f6e7f61a4419d2ac2ecba8b9078e7fa7d72 authored over 18 years ago by James Mead <[email protected]>
named mocks for unfulfilled expectations as well as unexpected calls

improved consistency of expectation error messages
allow multiple return values on consecutive ca...

1a7b19eab4ac54893e9aca454a88db1c387bea2f authored over 18 years ago by James Mead <[email protected]>
Namespace as much as possible.

fda9411de608ff2297983762683a8fd3cc283766 authored over 18 years ago by James Mead <[email protected]>
Added publish_packages rake task.

6ada427d7ef8d5a3cd12a54f711609dc641e6294 authored over 18 years ago by James Mead <[email protected]>
Improved RDoc for AutoVerify.

f8819fac860871a1476004ea4bfeb61e152a8c9f authored over 18 years ago by James Mead <[email protected]>
Remove last traces of auto_mocha.

9dd5c2a1b2be348415f354468bfe478794949565 authored over 18 years ago by James Mead <[email protected]>
Removed auto_mocha.

b105503424902b8d49d91bcb0c66c2af7fd48180 authored over 18 years ago by James Mead <[email protected]>
Fixed link to floehopper.

6ac0b1bd10e318b054dde30e2713a09193da6f5a authored over 18 years ago by James Mead <[email protected]>
Named mocks patch from Chris.

ebb66c30d7d49c8d6bf96713831c223fe5d29131 authored over 18 years ago by James Mead <[email protected]>
Added todo item.

aca5fcfccc61a81cd12f5512ff1aa2e9404ec397 authored over 18 years ago by James Mead <[email protected]>
Added missing files - MIT license and examples.

1fff807e0f618e6c1fe66369da80a01889a49ae0 authored over 18 years ago by James Mead <[email protected]>
Major overhaul of rdocs - only include public API. Added examples - syntax highlighting by coderay. Namespaced auto_verify.

2d337e0317386915e843069288a0c5f473c117df authored over 18 years ago by James Mead <[email protected]>
licensing changes - release 0.3.1

4f9dd60c2485fcf5a44cbc193d67a7e936210248 authored over 18 years ago by James Mead <[email protected]>
Released 0.3.0

4fc1bc3e4edc810beaf91c64ac54636b1927ca9d authored over 18 years ago by James Mead <[email protected]>
Auto-verify stub_everything instances. Allow specific stubs to be defined in stub_everything.

bfead9bc5c0c953ebf6b015231067f02e5523f59 authored over 18 years ago by James Mead <[email protected]>
Added stub_everything functionality. Only yield from stub if 'yields' is called for expectation, not just because block_given.

e67e27a0658c8b2d9b8cad8cb2bfec9ad638c2ef authored over 18 years ago by James Mead <[email protected]>
Ensure all teardowns are called even if exception raised in one teardown. Stubba verification failures have backtrace indicating line number where expects was called.

7a94ef3435dfd41b7755354d7afab3a29f61c553 authored over 18 years ago by James Mead <[email protected]>
Rename @object instance variable in class_method, etc to be stubbee.

282cd8d442ee222d63f9384a4d3af43f432d10ff authored over 18 years ago by James Mead <[email protected]>
Remove calls to verify in stubba_acceptance_test.

485fa9a8644f8e00f81a7d8094698d326fce80aa authored over 18 years ago by James Mead <[email protected]>
Auto-verify for Stubba. Include Stubba expectation verifications in test_result assertion count.

637a6b9795ef3e2255879d20db98cba4af3286ac authored over 18 years ago by James Mead <[email protected]>
Mocks should respond_to expected methods. Removed unnecessary code in mock.

5ff4e18761b959336a0c1878a6ca1643ce0fe936 authored over 18 years ago by James Mead <[email protected]>
Added yields method for expectation.

28e605932f291c33efaf330facda05fa1d4db712 authored over 18 years ago by James Mead <[email protected]>
Include expectation verifications in assertion count in test result. Filter out mocha classes from stacktraces. Set backtrace on expectation verification error to point to line where expectation was created.

7dbaf084932701610ab9be6fc202124d49f942e6 authored over 18 years ago by James Mead <[email protected]>
Fix requires for rails plugin.

f33ed6287a5e2ef19008a3bb2f7c2ecdc43b0ea2 authored over 18 years ago by James Mead <[email protected]>
Added init.rb in attempt to make rails plugin.

6a066df6302422cdb47e3eda68bb41f5cccba82a authored over 18 years ago by James Mead <[email protected]>
More todos

3bf2ab7871b26247c160af5a73458c1058276643 authored over 18 years ago by James Mead <[email protected]>
More todos

0a2aea9a5c3dab96c6b8ba7fb3a9bfb8f029e9fc authored over 18 years ago by James Mead <[email protected]>
Release 0.2.1

5ade0d0007bfccd556c37470703fe7365a666a39 authored over 18 years ago by James Mead <[email protected]>
Renamed MochaAcceptanceTest::Rover#move method to avoid conflict with Rake.

0bc13d521728d22f4e80b222091abacef4772afd authored over 18 years ago by James Mead <[email protected]>
Tweaks so that I can release 0.2.0

c38bdc689084ce4f8bf439b06ac912885a1cd4a7 authored over 18 years ago by James Mead <[email protected]>