- Compatibility with RSpec-2. There are now two adapters for RSpec, one that
works with RSpec-1 and a new one that works with RSpec-2. Currently, saying
RSpec.configure {|c| c.mock_with(:rr) }
still uses RSpec-1; to use the new one, you sayRSpec.configure {|c| c.mock_framework = RR::Adapters::RSpec2 }
. (#66, #68, #80) [njay, james2m] - Fix MethodMissingInjection so that
[stub].flatten
works without throwing a NoMethodError (undefined method #to_ary) error under Ruby 1.9 (#44) - Raise a MiniTest::Assertion error in the MiniTest adapter so that mock failures appear in the output as failures rather than uncaught exceptions (#69) [jayferd]
- Completely remove leftover #new_instance_of method, and also remove mention of #new_instance_of from the README
- Fix tests so they all work and pass again
- Fixed bug using workaround with leftover MethodMissingInjections
- Eliminate usage of ObjectSpace._id2ref (Patch Evan Phoenix)
- Added minitest adapter (Patch Caleb Spare)
- Added instructions on installing the gem (Patch Gavin Miller)
- delete missing scratch.rb file from gemspec (Patch bonkydog)
- Fixed Two calls recorded to a mock expecting only one call when called via another mock's yield block (http://github.com/btakita/rr/issues/closed#issue/42). Patch by Eugene Pimenov (http://github.com/libc).
- Removed new_instance_of for Ruby 1.9.2 compatibility. instance_of is now an alias for any_instance_of.
- Compatible with Ruby 1.9.2
- Added any_instance_of (aliased by all_instances_of), which binds methods directly to the class (instead of the eigenclass).
- Subclasses of a injected class do not have their methods overridden.
- any_instance_of and new_instance_of now have a block syntax
- Added RR.blank_slate_whitelist
- Fixed class_eval method redefinition warning in jruby
- Suite passes for Ruby 1.9.1
- Fixed 1.8.6 bug for real
- Fixed 1.8.6 bug
- Fixed issue with DoubleInjections binding to objects overriding the method method.
- Added MIT license
- Fixed Bug - dont_allow doesn't work when it follows stub (http://github.com/btakita/rr/issues#issue/20)
- Fixed exception with DoubleInjections on proxy objects (http://github.com/btakita/rr/issues#issue/24)
- Fixed Bug - Can't stub attribute methods on a BelongsToAssociation (http://github.com/btakita/rr/issues#issue/24)
- Fixed stack overflow caused by double include in Test::Unit adapter [http://github.com/btakita/rr/issues#issue/16]. Identified by Dave Myron (http://github.com/contentfree)
- Fixed warnings (Patch by Bryan Helmkamp)
- Handle lazily defined methods (where respond_to? returns true yet the method is not yet defined and the first call to method_missing defines the method). This pattern is used in ActiveRecord and ActionMailer.
- Fixed warning about aliasing #instance_exec in jruby. http://github.com/btakita/rr/issues#issue/9 (Patch by Nathan Sobo)
- RR properly proxies subjects with private methods [http://github.com/btakita/rr/issues/#issue/7]. Identified by Matthew O'Connor.
- Fixed issue with DoubleInjection not invoking methods that are lazily created [http://github.com/btakita/rr/issues/#issue/4]. Identified by davidlee (http://github.com/davidlee)
- Fixed issue with mock.proxy and returns [http://github.com/btakita/rr/issues/#issue/2]. Identified by trogdoro (http://github.com/trogdoro)
- Method is no longer invoked if respond_to? returns false. This was in place to support ActiveRecord association proxies, and is no longer needed.
- instance_of Doubles now apply to methods invoked in the subject's #initialize method.
- Fixed exception where the Subject uses method delegation via method_missing (e.g. certain ActiveRecord AssociationProxy methods)
- Fixed compatability issues with Ruby 1.9
- Aliased any_number_of_times with any_times
- Better error messages for have_received and assert_received matchers (Patch by Joe Ferris)
- Better documentation on RR wilcard matchers (Patch by Phil Arnowsky)
- Performance improvements
- Added spies (Patchs by Joe Ferris, Michael Niessner & Mike Mangino)
- Added strongly typed reimplementation doubles (Patch by Michael Niessner)
- Fixed DoubleDefinition chaining edge cases
- DoubleDefinitionCreatorProxy definition eval block is instance_evaled when the arity is not 1. When the arity is 1, the block is yielded with the DoubleDefinitionCreatorProxy passed in.
- Friendlier DoubleNotFound error message
- Implemented Double strategy creation methods (#mock, #stub, #proxy, #instance_of, and ! equivalents) on DoubleDefinition
- Implemented hash_including matcher (Patch by Matthew O'Conner)
- Implemented satisfy matcher (Patch by Matthew O'Conner)
- Implemented DoubleDefinitionCreator#mock!, #stub!, and #dont_allow!
- Modified api to method chain Doubles
- Fix conflict with Mocha overriding Object#verify
- Method chaining Doubles (Patch by Nick Kallen)
- Chained ordered expectations (Patch by Nick Kallen)
- Space#verify_doubles can take one or more objects with DoubleInjections to be verified
- DoubleDefinitionCreatorProxy does not undef #object_id
- Fixed rdoc pointer to README
- Proxying from RR module to RR::Space.instance
- Fixed issue with Hash arguments
- Improved error message
- Added Double#verbose and Double#verbose?
- Fixed doubles for == and #eql? methods
- Doc improvements
- Methods that are not alphabetic, such as ==, can be doubles
- Doc improvements
- Cleanup
- Finished renaming scenario to double
- Renamed DoubleInsertion to DoubleInjection to be consistent with Mocha terminology
- Fixed backward compatability issues with rspec
- Renamed Space#verify_double_insertions to #verify_doubles
- Documentation improvements
- Renamed Double to DoubleInsertion
- Renamed Scenario to Double
- Fixed [#13724] Mock Proxy on Active Record Association proxies causes error
- Fixed [#13139] Blocks added to proxy sets the return_value and not the after_call callback
- Alias probe to proxy
- Implemented [#13009] Better error mesage from TimesCalledMatcher
- Fixed [#12928] Reset doubles fails on Rails association proxies
- Fixed [#12765] Issues with ObjectSpace._id2ref
- trim_backtrace is only set for Test::Unit
- Implemented instance_of
- Fixed [#12495] Error Probing method_missing interaction
- Fixed [#12486] ScenarioMethodProxy when Kernel passed into instance methods
- Automatically require Test::Unit and Rspec adapters
- ScenarioCreator strategy method chaining
- Removed mock_probe
- Removed stub_probe
- mock takes method_name argument
- stub takes method_name argument
- mock_probe takes method_name argument
- stub_probe takes method_name argument
- probe takes method_name argument
- dont_allow takes method_name argument
- do_not_allow takes method_name argument
- Space#doubles key is now the object id
- Fixed [#12402] Stubbing return value of probes fails after calling the stubbed method two times
- Added RRMethods#rr_verify and RRMethods#rr_reset
- Fixed "singleton method bound for a different object"
- Doing Method aliasing again to store original method
- Added mock_probe
- Added stub_probe
- Probe returns the return value of the passed in block, instead of ignoring its return value
- Scenario#after_call returns the return value of the passed in block
- Not using method aliasing to store original method
- Renamed DoubleMethods to RRMethods
- Added RRMethods#mock_probe
- Fixed [#12333] Rebinding original_methods causes blocks not to work
- Introduced concept of Terminal and NonTerminal TimesCalledMatchers
- Doubles that can be called many times can be replaced
- Terminal Scenarios are called before NonTerminal Scenarios
- Error message tweaking
- Raise error when making a Scenarios with NonTerminal TimesMatcher Ordered
- Fixed [#12290] Scenario#returns with false causes a return value of nil
- Fixed bug where Creators methods are not removed when methods are defined on Object
- Fixed [#12289] Creators methods are not removed in Rails environment
- Fixed [#12287] AtLeastMatcher does not cause Scenario to be called
- Fixed [#12286] AnyArgumentExpectation#expected_arguments not implemented
- Added DoubleMethods#any_times
- Added Scenario#any_number_of_times
- TimesCalledError Message Formatted to be on multiple lines
- ScenarioNotFoundError Message includes all Scenarios for the Double
- ScenarioOrderError shows list of remaining ordered scenarios
- Fixed [#12194] Double#reset_doubles are not clearing Ordered Scenarios bug
- Added Space#reset
- Space#reset_doubles and Space#reset_ordered_scenarios is now protected
- Added Scenario#at_least
- Added Scenario#at_most
- [#12120] probe allows a the return value to be intercepted
- TimesCalledExpectation says how many times were called and how many times called were expected on error
- TimesCalledError prints the backtrace to where the Scenario was defined when being verified
- Error message includes method name when Scenario is not found
- Fixed issue where Double#placeholder_name issues when Double method name has a ! or ?
- Scenario#returns also accepts an argument
- Implemented Scenario#yields
- Trim the backtrace for Rspec and Test::Unit
- Rspec and Test::Unit integration fixes
- Initial Release