Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec-mocks
head fork: rspec/rspec-mocks
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Nov 25, 2011
@dchelimsky dchelimsky gotta use _some_ rake though b6eb554
Commits on Nov 26, 2011
@dchelimsky dchelimsky dev: move dev-env gems to Gemfile-custom.sample a1baff8
@dchelimsky dchelimsky dev: store the sample, not the actual file 8f9b53d
@dchelimsky dchelimsky add DEV-README bb606af
@dchelimsky dchelimsky rdoc 6d93edd
Commits on Nov 27, 2011
@icambron icambron added ruby syntax highlighting for github a13dd64
@icambron icambron removed extra indentation in readme f86db3e
@dchelimsky dchelimsky Begin to refactor any_instance framework a bit as I wrap my head arou…
…nd it.
@dchelimsky dchelimsky silly cut/paste 1f3a352
@dchelimsky dchelimsky rdoc: test to see if github markup works as expected on 75fb857
@dchelimsky dchelimsky restore rdoc examples to standard markdown indentation until rdoc.inf…
…o supports git-flavored markup
Commits on Nov 29, 2011
@dchelimsky dchelimsky rdoc: AnyInstance::Chain DSL methods (thanks to Loren Segal for the y…
…ard tip)
@dchelimsky dchelimsky rdoc: add @see tags to AnyInstance::Chain methods b147e12
@dchelimsky dchelimsky more rdoc - trying out GFM on again 8f8fa3d
@dchelimsky dchelimsky no go on GFM for now de90662
@dchelimsky dchelimsky rdoc: maybe GFM works for .md files but not .rb files? 2bc29ca
@dchelimsky dchelimsky rdoc: undo GFM again 64b1483
@dchelimsky dchelimsky rdoc: some message expectation methods db61d60
@dchelimsky dchelimsky rdoc: remaining MessageExpectation methods 382fadb
@dchelimsky dchelimsky rdoc: add GFM test file (temp) dc8aba1
@dchelimsky dchelimsky need to include it in .yardopts, silly 39e227a
@dchelimsky dchelimsky clean up ArgumentMatchers b701d0f
@dchelimsky dchelimsky rdoc 45b6314
Commits on Nov 30, 2011
@dchelimsky dchelimsky rdoc - mostly hiding noise end-users don't care about 8ddbed7
@dchelimsky dchelimsky Merge pull request #89 from icambron/doc_changes
Use github-flavored-markdown for the README
@dchelimsky dchelimsky don't need the GFM test any longer (it works now) c758d40
@dchelimsky dchelimsky rdoc: legal ruby in the comments actually works 50a4980
Commits on Dec 02, 2011
@dchelimsky dchelimsky add license to gemspec (and consequently the gem) 8e60983
Commits on Dec 04, 2011
@dchelimsky dchelimsky don't need redcarpet in the .yardopts since yard 0.7.4 5424a5c
Commits on Dec 05, 2011
@dchelimsky dchelimsky fix ruby parsing error in rdoc 26d3ffb
Commits on Dec 06, 2011
@pat pat Throwing with parameters
This is written so I can stub out Warden's behaviour appropriately - and I realise it's simple, but perhaps this is all that's needed. It certainly works for me.
@pat pat Following Kernel.throw's method signature
First argument is the symbol, second is the optional object that is returned.
@dchelimsky dchelimsky Merge pull request #90 from freelancing-god/throw-with-params
Throwing with parameters
@dchelimsky dchelimsky align the examples for and_throw
- #90
@dchelimsky dchelimsky fix warnings
- #90
Commits on Dec 20, 2011
@dchelimsky dchelimsky prep for 2.8.0.rc2 12506e1
Commits on Jan 05, 2012
@dchelimsky dchelimsky bump to 2.8.0 ea8cc1f
Commits on Jan 26, 2012
@justinko justinko Allow a `as_null_object` to be passed to `with`. Closes #98 de283b3
Commits on Jan 29, 2012
@coreyhaines coreyhaines Better message if #and_raise exception type requires constructor params 6fe4168
@coreyhaines coreyhaines Make name of sample exception a bit more clear as to its purpose b92f2cc
Commits on Jan 30, 2012
@justinko justinko Don't hit `__mock_proxy` unless you need to. This avoids a Rubby 1.8.…
…7 Proc equality bug:

This commit fixes the build for 1.8.7
@dchelimsky dchelimsky Merge pull request #100 from coreyhaines/and_raise_big_arity_construc…

Better message if #and_raise exception type requires constructor params

- Fixes #99.
@dchelimsky dchelimsky More detailed error message when and_raise gets a class whose constru…
…ctor requires 1 or more args.

- #99, #100.
@dchelimsky dchelimsky clean up some specs 5897343
Commits on Feb 02, 2012
@nruth nruth Use the null object, rather than re-assigning another double 9a095fb
Commits on Feb 03, 2012
@dchelimsky dchelimsky Merge pull request #104 from nruth/patch-1
Use the null object, rather than re-assigning another double
Commits on Feb 04, 2012
@aubreyrhodes aubreyrhodes Fixing blocks not being passed to stubs f0c7643
Commits on Feb 05, 2012
@dchelimsky dchelimsky Merge pull request #105 from aubreyrhodes/fix_stub_not_passing_block
Fixing blocks not being passed to stubs
@dchelimsky dchelimsky Simplify some examples.
- #105.
@dchelimsky dchelimsky Changelog for #105 6743cd7
Commits on Feb 08, 2012
@preethiramdev preethiramdev Making ordering common to all object per spec 221594b
@preethiramdev preethiramdev Adding spec to test the ordering is reset each time c59981d
@dchelimsky dchelimsky Merge pull request #106 from preethiramdev/issue-101
Support order constraints across objects
@dchelimsky dchelimsky Changelog for #101, #106 35f67e6
@dchelimsky dchelimsky dev: restore random ordering 0ce8c71
@dchelimsky dchelimsky clean up order constraint spec 3f94b50
@dchelimsky dchelimsky clear expectation_ordering rather than creating a new one for each ex…
@dchelimsky dchelimsky some mocks are not mocks 17c259e
Commits on Feb 09, 2012
@dchelimsky dchelimsky refactoring: those syms are messages dce2d2c
Commits on Feb 11, 2012
@justinko justinko No need to require yaml. 56a5ccd
Commits on Feb 17, 2012
@preethiramdev preethiramdev Initializing message expectation args to match any args 917dca2
@dchelimsky dchelimsky Merge pull request #109 from c42engineering/expectation_args
Initialize child message expectation args to match any args (See #103)
@dchelimsky dchelimsky Changelog for #109 59c41e8
@dchelimsky dchelimsky minor refactoring: rename args_expectation to argument_expectation (i…
@dchelimsky dchelimsky clean up and enhance spec for mixing stubs and expectations 117f2cb
Commits on Feb 20, 2012
@preethiramdev preethiramdev should receiving stubbed atleast_once removes matching stub 235c8cc
Commits on Feb 24, 2012
@preethiramdev preethiramdev Fixing method called on nil warning 251bf2a
@dchelimsky dchelimsky Merge pull request #110 from c42engineering/issue-103
should_receive(:x).at_least_once clears any stubs on :x

- Fixes #103
@dchelimsky dchelimsky Revert "Merge pull request #110 from c42engineering/issue-103"
Turns out this change is significantly backward-incompatible that we're
going to have to wait for rspec-mocks-3 to release it (or similar)

This reverts commit 6e23ca9, reversing
changes made to 117f2cb.
Commits on Feb 27, 2012
@dchelimsky dchelimsky check if @_null_object is defined to avoid warning when it is not 185d47e
Commits on Mar 05, 2012
@nathanl nathanl Explained why `before(:all)` won't work for stubs. 0815a4a
Commits on Mar 12, 2012
@dchelimsky dchelimsky bump to 2.9.0.rc1 c83ae1c
@dchelimsky dchelimsky restore some gems to Gemfile e7d92e4
@dchelimsky dchelimsky ci: don't need to exclude development env any longer 377c32b
@dchelimsky dchelimsky align gemspec with other rspec libs 21d21ce
@dchelimsky dchelimsky bump to 2.9.0.rc2 06ce1ab
Commits on Mar 17, 2012
@dchelimsky dchelimsky bump to 2.9.0 e62d381
@dchelimsky dchelimsky dev: add a script to download ruby-debug-base19-0.11.26.gem and linec…
…ache19-0.5.13.gem to a local cache

[ci skip]
@dchelimsky dchelimsky only one ref to yard please c8a5ef5
Commits on Mar 21, 2012
@myronmarston myronmarston Extract mock logic into TestDouble module.
This allows objects to be treated as a pure test double without needing to subclass RSpec::Mocks::Mock.

Closes #117.
Commits on Mar 28, 2012
@maeve maeve and_raise should support intentionally raising an ArgumentError 38ddf48
@myronmarston myronmarston Merge pull request #121 from maeve/fix-raising-argumenterrors
and_raise should support intentionally raising an ArgumentError
Commits on Apr 16, 2012
@dchelimsky dchelimsky fail fast when an exactly or at_most expectation is exceeded fb9c76c
@dchelimsky dchelimsky minor refactoring for clarity 381c7c8
@dchelimsky dchelimsky a little more refactoring 764680c
@dchelimsky dchelimsky Refactoring: collapse concepts of method_block and return_block into
Commits on Apr 17, 2012
@dchelimsky dchelimsky Make the fact that you can set message expectations on class objects
more obvious.

- Closes #125.

[ci skip]
Commits on Apr 18, 2012
@CoryFoy CoryFoy Correct spelling of "Responses" 40a2a0f
@justinko justinko Merge pull request #126 from CoryFoy/patch-1
Correct spelling of "Responses"
Commits on Apr 21, 2012
@dchelimsky dchelimsky one line on one line fa13314
Commits on Apr 22, 2012
@dchelimsky dchelimsky shorten file extension 707f515
@dchelimsky dchelimsky align config files across rspec projects 4b47e54
@dchelimsky dchelimsky dev: align Gemfiles across rspec projects b4204fb
Commits on May 01, 2012
@dchelimsky dchelimsky update yard to 0.8 1e4c1e6
Commits on May 04, 2012
@dchelimsky dchelimsky refactor subject out of one spec 604dc5d
@dchelimsky dchelimsky update changelog for 2.10 release 4862911
@dchelimsky dchelimsky bump to 2.10.0 6732d62
@dchelimsky dchelimsky rename some things in a spec d4b983c
@dchelimsky dchelimsky Fixed bug where at_least(0) failed when message was received
- Fixes #132
@dchelimsky dchelimsky Make sure at_least(0) passes even when never called
- Fixes #132 again
Commits on May 05, 2012
@dchelimsky dchelimsky dev: config for :focus 877dfa6
@dchelimsky dchelimsky dev: refactor a spec 2e9d990
@dchelimsky dchelimsky should_not_receive ignores and_return
- See #132
@dchelimsky dchelimsky bump to 2.10.1 112b430
Commits on May 09, 2012
@dchelimsky dchelimsky Expose ArgumentListMatcher as a formal API
- supports use by 3rd party mock frameworks like Surrogate.
Commits on May 13, 2012
@dchelimsky dchelimsky spec refactoring: move shared examples to the one spec using them. eb12635
@dchelimsky dchelimsky dev: use :unless filter instead of a global exclusion filter e03d66b
@dchelimsky dchelimsky dev: rename context 671076d
@dchelimsky dchelimsky spec refactoring: rename subject with intention revealing name
- even though 'object' is no less generic than 'subject', it makes it
  more clear that we're talking about a generic object.
Commits on May 17, 2012
@dchelimsky dchelimsky Merge pull request #115 from nathanl/master
Explained why `before(:all)` won't work for stubs.
@myronmarston myronmarston Fix a regression.
When doing something like:

  double.stub(:foo).and_return(a, b)
  double.should_receive(:foo).once { a } used to work, but in 2.10 it raises a NoMethodError (#size).
Commits on May 19, 2012
@kaiwren kaiwren Replicating Issue #120 7d85604
Commits on May 20, 2012
@kaiwren kaiwren Issue #120: Under any_instance, modify #dup to remove the mock proxy 5de6500
Commits on May 22, 2012
@myronmarston myronmarston Update changelog. a11fcdc
Commits on May 23, 2012
@justinko justinko Merge pull request #138 from c42engineering/issue_120
Issue #120
@justinko justinko changelog [ci skip] c64c605
@justinko justinko No need for an "issue specific" spec file. aca2b40
@kaiwren kaiwren Replicated Issue #124 419b64a
@aakashd aakashd issue #124: adding support for any_instance.should_not_receive 6e858e4
@dchelimsky dchelimsky Merge pull request #139 from c42engineering/issue124
add support for any_instance.should_not_receive
Commits on May 24, 2012
@dchelimsky dchelimsky `should_receive(x).at_least(:once).and_return(y)` always returns y ev…
…en if x is already stubbed

    widget.stub(:count => 1)
    widget.count #=> 2
    widget.count #=> 2

If there is no return value set, it will fall back to the stub value:

    widget.stub(:count => 1)
    widget.count #=> 1
    widget.count #=> 1

- Fixes #142
Commits on May 25, 2012
@brynary brynary Add Code Climate badge 8879661
@dchelimsky dchelimsky Merge pull request #143 from brynary/codeclimate-badge
Add Code Climate badge
Commits on May 31, 2012
@pje pje `:%s/ducktype/duck_type/g` 5edfe94
@dchelimsky dchelimsky Merge pull request #145 from pjellis/patch-1
[typo] underscore-ize 'ducktype' in
Commits on Jun 02, 2012
@myronmarston myronmarston First pass at implementing constant stubbing.
This is almost copied verbatim from rspec-fire.

For #144.
@myronmarston myronmarston Always restore original constants.
The original logic from rspec-fire did not restore original constants
if the user changed them in the example after stubbing them, but after
talking it over with @dchelimsky and @garyberhnardt we've decided to
be consistent and always restore them.

For #144.
@myronmarston myronmarston Remove the bang from our #stub! methods.
I'm not really sure why I used them when I wrote this in rspec-fire;
given there were not corresponding bang-less methods, it didn't
really make sense.

For #144.
@myronmarston myronmarston Fix a constant stubbing edge case.
stub_const("A::B::C", whatever) cannot work if A::B is defined
but A::B is not a module.

For #144.
@myronmarston myronmarston Remove unused method.
For #144.
@myronmarston myronmarston Add API docs for new constant stubbing code.
For #144.
@myronmarston myronmarston Add cukes for new stub_const feature.
Closes #144.
Commits on Jun 03, 2012
@myronmarston myronmarston Fix typo pointed out by @justinko. 7ab3d61
@myronmarston myronmarston Replace duplicated README content with a link.
As per the conversation with @justinko and @dchelimsky:
#146 (comment)

Note that this link is broken for now because this hasn't
yet been merged into master. But I figured it was better
not to use a working link just to the branch since that
branch will likely be deleted in the near future.
@myronmarston myronmarston Refactor constant stubbers a bit.
This is based on @justinko's suggestions:
#146 (comment)
Commits on Jun 04, 2012
@myronmarston myronmarston Remove unused helper method. 22c2049
Neha Kumari Issue #123: Improved error message when user forgets to stub a method…
… with default behavior.
@dchelimsky dchelimsky Merge pull request #147 from c42engineering/issue123
Issue #123: Improved error message when user forgets to stub a method with a default.
@dchelimsky dchelimsky Use the improved message from the prev commit for stubs, not message …

- Closes #147, #123.
Commits on Jun 07, 2012
@myronmarston myronmarston Return stubbed value rather than original value from stub_const.
This allows chaining:

  stub_const("Foo", double).stub(:foo)
@myronmarston myronmarston Add `Constant.original` API to query rspec-mocks about stubbed consta…

This needs to be documented, but I want to get feedback from others before spending effort on that.
Commits on Jun 08, 2012
@myronmarston myronmarston Make Constant.unstubbed private since it's an internal API. fd595a8
@myronmarston myronmarston Refactor away the use of #its.
#its is going away in rspec-core at some future point, so we shouldn't use it here.
Commits on Jun 11, 2012
@myronmarston myronmarston Add API docs for Constant.original query API. 3b63c51
@myronmarston myronmarston Merge pull request #146 from rspec/constant-stubbing f5c63c3
@myronmarston myronmarston Mention new stub_const feature in changelog. f04d527
Neha Kumari Issue #134: Add deprecation warning for should_not_receive followed b…
…y and_return.
Commits on Jun 15, 2012
@dchelimsky dchelimsky refactor: rename ExpectationChain to PositiveExpectationChain
Also extract base ExpectationChain.
Commits on Jun 18, 2012
@myronmarston myronmarston Prevent infinite loop when interpolating a null double as an integer …
…into a string.

Closes #154.
@myronmarston myronmarston Weird, 1.9.2 acts differently here than 1.9.3 and 1.8.7. b96dd92
Commits on Jun 24, 2012
@myronmarston myronmarston Fix `should_receive` to preserve null object behavior.
Given a case like:

   double = mock.as_null_object

...`` was returning nil when it should return the double itself, since that's the expected null object behavior and no implementation was provided for the mock expectation.

Closes #155.
Commits on Jun 25, 2012
@myronmarston myronmarston Cleanup whitespace.
(Actually, I'm mostly doing this just to trigger a travis build. A
recent change in rspec-expectations[1] broke the rspec-mocks
travis build, and now that it's fixed[2], I want to see that the
rspec-mocks build is passing.  I figured I may as well make a useful
but non functional change while I'm at it, though).

[1] rspec/rspec-expectations@4024344#commitcomment-1496381
[2] rspec/rspec-expectations@a3e2839
Commits on Jun 27, 2012
@amarshall amarshall Raise RuntimeError instead by default in and_raise to match Ruby default dc5e1a7
@myronmarston myronmarston Merge pull request #156 from amarshall/master
Raise RuntimeError instead of Exception by default in and_raise to match Ruby's default
@myronmarston myronmarston Update changelog. aa179ed
Commits on Jul 07, 2012
@dchelimsky dchelimsky bump to 2.11.0 e6bba62
@dchelimsky dchelimsky improve automation for publishing to b35b5b4
Commits on Jul 09, 2012
@myronmarston myronmarston Fix edge case bug exposed w/ `should_receive` on a null object w/ a p…
…revious stub.

In a case like:

  double = stub.as_null_object
  double.stub(:foo => "bar")
  double.should_receive(:foo) used to return "bar", but due to my changes in a5f296e it was returning `self`.
Commits on Jul 10, 2012
@myronmarston myronmarston 2.11.1 release. 24090f8
@ugisozols ugisozols Add missing 'be's to the README. 5288070
@justinko justinko Merge pull request #161 from ugisozols/master
Add missing 'be's to the README.
Commits on Jul 11, 2012
@myronmarston myronmarston Fix ruby warnings.
- lib/rspec/mocks/error_generator.rb:32: warning: assigned but unused variable - expected_args
- lib/rspec/mocks/error_generator.rb:33: warning: assigned but unused variable - actual_args
- lib/rspec/mocks/stub_const.rb:8: warning: shadowing outer local variable - name
- lib/rspec/mocks/stub_const.rb:12: warning: shadowing outer local variable - name
- spec/rspec/mocks/stub_const_spec.rb:60: warning: assigned but unused variable - orig_value
- lib/rspec/mocks/stub_const.rb:233: warning: instance variable @registered_with_mocks_space not initialized

Closes #162.
Commits on Aug 01, 2012
@dchelimsky dchelimsky Don't modify dup on classes that don't support dup
Fixes #168.
Commits on Aug 03, 2012
@daneget daneget Fix any_instance to handle methods defined on superclasses.
Previously, the recorder implementation created a SystemStackError.

Closes #152.
@myronmarston myronmarston Cleanup spec a bit. 306ee36
@myronmarston myronmarston Update changelog. f1a2682
Commits on Aug 05, 2012
@dchelimsky dchelimsky align the feature READMEs for stubs and message expectations e2826c6
@dchelimsky dchelimsky dev: update optional dev dependencies 37e095c
Commits on Aug 10, 2012
@jredville jredville fix formatting for relish df607ea
@alindeman alindeman Merge pull request #173 from jredville/master
Clean up formatting for Relish
Commits on Aug 11, 2012
@myronmarston myronmarston Fix use of const_defined? and const_get so it ignores top-level const…

I didn't realize this previously, but these methods can pick up a top-level
constant when you don't intend it (e.g. ::Hash when checking MyGem.const_defined?("Hash")).
Commits on Aug 12, 2012
@myronmarston myronmarston 2.11.2 release. e7bd234
Commits on Aug 14, 2012
@myronmarston myronmarston Fix transfer_nested_constants option of stub_const.
My changes in deec990 caused it to blow up in the face of inherited constants.
Commits on Aug 16, 2012
@dchelimsky dchelimsky Use pure doubles ( in the middle of stub_chain
- was using
- Fixes #587
Commits on Aug 20, 2012
@dchelimsky dchelimsky Merge pull request #151 from c42engineering/issue_134
Issue #134: Add deprecation warning for should_not_receive followed by and_return
@dchelimsky dchelimsky Add caller info to deprecation warning
- See #151
@dchelimsky dchelimsky Changelog for #151 90f3ebb
Commits on Aug 24, 2012
@myronmarston myronmarston Fix serialization_spec to be able to run in isolation w/o bundler.
Fixes #174.
@myronmarston myronmarston Run all specs together and in isolation w/o bundler as part of the bu…

We want these to always pass this way, so having it as part of the build is important.

This should help prevent a regression for #174 and issues like it.
@myronmarston myronmarston Explicitly load psych.
This is needed on 1.9.2 to get the serialization specs to pass when run in isolation w/o bundler.

For #174.
Commits on Aug 25, 2012
@myronmarston myronmarston Print each command before running it.
This makes it easier to run one of them when we get a failure.
Commits on Aug 26, 2012
@alindeman alindeman any_instance is supported when a class overrides Object#method
* Fixes #180
* Closes #181
Commits on Sep 09, 2012
@alindeman alindeman Correctly unstubs methods stubbed with `#any_instance`
* Instances stubbed with `#any_instance` would not be usable after the
  test finished because `MethodDouble` would stash the implementation of
  the method already overridden by `AnyInstance::Recorder`. When the
  test finished, that implementation would be restored on the object's
  singleton class, and any future calls to it would blow up with a stack
* This fix only stashes methods if they are defined on the object's
  singleton class to begin with; `AnyInstance::Recorder` defines a
  method on the object's class so that method will not be stashed.
* If there is no method on the object's singleton class, RSpec can
  safely define one there without stashing the original implementation.
  At the end of the test, the method is simply removed entirely from the
  singleton class. Any original implementation defined in the object's
  ancestor chain will show through again.
* This issue cannot be fixed on MRI 1.8.6 because it does not support
  `Method#owner`. However, `#any_instance` itself is not supported on
  1.8.6 for the same reason. The fix should not negatively affect 1.8.6,
  though, because the fallback behavior is to stash the method in all
  cases (which was the original behavior).

* This commit also refactors the stashing behavior out into its own
  object. While not explicitly necessary, it helped me reason about the
  fix much easier than when all the responsibility was in `MethodDouble`
  (which also has other responsibilities).

* Fixes #167
* Closes #182
@alindeman alindeman Changelog for #167 and #182
[ci skip]
@alindeman alindeman Adds travis build badge
[ci skip]
@alindeman alindeman Adds test to prevent regression of #69
* Bug fixed in a727464
* Closes #69
Commits on Sep 12, 2012
David Chelimsky update Gemfile-custom 4269862
Commits on Sep 15, 2012
@alindeman alindeman Fixes regression with methods stubbed multiple times in a single test
* Regression introduced by a727464.
* The cause:
  - Test code requests a method be stubbed
  - Since the method was not defined on the object's singleton class, it
    did not need to be stashed
  - Proxied method is defined on the object's singleton class
  - Test code requests a method to be stubbed (again)
  - Since the proxied method is defined on the object's singleton class,
    it is stashed (bug here!)
  - Later, the proxied method is restored in the reset step; future
    calls to that method are broken
* The fix:
  - Do not stash methods if a method has already been proxied by
* Test written by @myronmarston (thanks!)
Commits on Sep 16, 2012
@basvodde basvodde and_raise more closely matches Kernel#raise
* Closes #177
Commits on Sep 18, 2012
@dchelimsky dchelimsky whitespace and unnecessary refs to self e163390
Commits on Sep 19, 2012
@myronmarston myronmarston Fix confusing error message.
When a class method was mocked and it was called an extra time with the wrong arguments, the error being raised was:

"NoMethodError: undefined method `bar' for Object:Class"

...which was very confusing.
@myronmarston myronmarston Refactor expectation-finding logic.
Besides the improved readability of this code, I think it should be
slightly faster in certain circumstances. The old version would scan
the full list twice; this only scans the list once.
Commits on Sep 20, 2012
@myronmarston myronmarston Updates to reflect that 2.11.3 has been released. 74c5f02
Commits on Sep 25, 2012
@behrends behrends Fix typo 609e365
@myronmarston myronmarston Merge pull request #185 from behrends/patch-1
Fix typo
Commits on Sep 30, 2012
@dchelimsky dchelimsky whitespace 594e8f9
Commits on Oct 02, 2012
@myronmarston myronmarston Cleanup whitespace. da2a091
@myronmarston myronmarston Refactor before/ivar to let.
I'm planning on adding some more examples here that won't use this object,
so there's no need to waste cycles instantiating it for examples that
won't use it.
@myronmarston myronmarston No need to send an ivar to do a local variable's job. 454fd67
@myronmarston myronmarston Use anonymous classes rather than leaking constants. 664bc24
@myronmarston myronmarston Support mocking on BasicObject-subclassed proxies. 1bfed86
Commits on Oct 03, 2012
@myronmarston myronmarston Config API: `add_stub_and_should_receive_to module`. 9c169b4
@4r2r 4r2r ArgumentError when using any_instance like this: klass.any_instance.n…
Commits on Oct 04, 2012
@alindeman alindeman Tests build on rbx 06d80ae
@alindeman alindeman Merge pull request #189 from 4r2r/master
ArgumentError when calling dup with parameters
Commits on Oct 06, 2012
@myronmarston myronmarston Merge pull request #188 from rspec/basic_object_support
Support mocking on BasicObject-subclassed proxies.
Commits on Oct 08, 2012
@myronmarston myronmarston Allow rbx builds to fail.
We're getting weird sudden regressions on rbx, and given the frequency of RBX updates (and recent experience with failing rbx bulids in VCR and other
rspec repos), I think it's due to a bug in rbx.

While we're at it, let's enable JRuby builds, too.
@goblin goblin add a small example to README
It may be obvious, but took me a while to figure out
@myronmarston myronmarston Merge pull request #190 from digital-science/readme_yield_note
add a small example to README
Commits on Oct 11, 2012
@alindeman alindeman We are green under rbx again 3d9d860
Commits on Oct 12, 2012
@vanstee vanstee Identify ruby code for syntax highlighting
Fixes #191
@alindeman alindeman Merge pull request #192 from vanstee/ruby_file_doc_strings
Identify ruby code for syntax highlighting
Commits on Oct 13, 2012
@myronmarston myronmarston Fix confusing code comment. 68f1d1c
Commits on Oct 16, 2012
@alindeman alindeman Saves some Travis CPU cycles by skipping documentation-only gems 25030bc
@alindeman alindeman Output matches correctly on JRuby a95947d
@alindeman alindeman JRuby 1.8 mode is green 7a0b956
@alindeman alindeman JRuby --1.9 responds with RUBY_VERSION == "1.9.2" but does not have t…
…his special case
@alindeman alindeman JRuby --1.9 is green b82e1fe
Commits on Oct 20, 2012
@myronmarston myronmarston Nest StashedInstanceMethod under RSpec::Mocks.
We shouldn't grab any top level real-estate except for the `RSpec` constant itself.
@alindeman alindeman Introduces `hide_const` 9f94f23
@alindeman alindeman Terms APIs as mutators, which include objects that stub and hide cons…
@alindeman alindeman Adds scenario demonstrating that nested hidden constants are correctl…
…y restored
@alindeman alindeman Adds more test coverage for hide_const edge cases 2d6fc59
@alindeman alindeman Hiding an undefined constant is a no-op 72f73a3
@alindeman alindeman Removes usages of ConstantStubber in favor of ConstantMutator 545c2f0
@alindeman alindeman Renames stub_const.rb -> mutate_const.rb c8552f9
Commits on Oct 21, 2012
@myronmarston myronmarston Add `and_call_original` which delegates to the original method. 2ab2776
@myronmarston myronmarston On 1.8, Symbol#=~ doesn't match regexes. 57d50ff
@myronmarston myronmarston Add snippet demonstrating a weird 1.8.7 bug. 61f78ce
@alindeman alindeman Replaces more internal APIs with "mutated" instead of overly-specific…
… "stubbed"
@alindeman alindeman Introduces Constant#mutated? and Constant#hidden?
* A constant is mutated if it has been either stubbed or hidden
@alindeman alindeman Adds additional documentation for mutating constants 0a9316f
@alindeman alindeman Merge pull request #183 from alindeman/hide_const
Add support to temporarily remove constants
@myronmarston myronmarston Silence `toplevel constant Hash referenced by TestClass::Hash` warning. b217232
@myronmarston myronmarston Use new `hide_const` API rather than manually hiding a constant. 22d18ce
Commits on Oct 22, 2012
@myronmarston myronmarston Ensure the method has the proper `self` for the case of a superclass …
…singleton method.
@myronmarston myronmarston Work around cases where objects may override #method. e642d51
Commits on Oct 23, 2012
@myronmarston myronmarston Remove `method_missing` inconsistency.
Based on conversations with @dchelimsky and others, we've decided it's best not
to raise an early error from `and_call_original` as that creates an
inconsistency since we sometimes don't know if `method_missing` will handle
the message or not.
@myronmarston myronmarston Rename StashedInstanceMethod to InstanceMethodStasher.
The old name implied it always stashed a method (and made
`stashed_method.method_is_stashed?` read funny). The new
name makes it clear what role the object plays without
implying that it always stashes the method.
@myronmarston myronmarston Add additional yard private declarations. f6d03d5
Commits on Oct 24, 2012
@myronmarston myronmarston Clarify specs based on @dchelimsky's feedback. aff31ae
Commits on Oct 25, 2012
@myronmarston myronmarston Remove code that should have been removed in 98ca879.
I forgot to remove this code as part of that commit.
@myronmarston myronmarston Deal with 1.8 shortcoming.
1.8 does not allow you to bind a singleton method from a class's superclass to the class, so our original code failed. This tries to work around the issue while alerting the user to the fact that it may not work correctly in all cases.
Commits on Oct 26, 2012
@myronmarston myronmarston Merge pull request #23 from myronmarston/can_call_original
Add method to call_original method from a stub
Commits on Nov 06, 2012
@dchelimsky dchelimsky improve docs for double(), mock(), and stub() cddb5dc
Commits on Nov 09, 2012
@jeffweiss jeffweiss fix receive spelling error
Prior to this commit several of the examples in the message expectation
documentation had the method as `should_recieve` when the proper
spelling is `should_receive`. This commit fixes those documentation
@alindeman alindeman Merge pull request #194 from jeffweiss/fix_receive_spelling_error
fix receive spelling error
Commits on Nov 13, 2012
@dchelimsky dchelimsky prep for 2.12 [ci-skip] b194a64
@alindeman alindeman Updates to rake 10 a9755d1
@dchelimsky dchelimsky bump version to 2.12 f8faced