Switch branches/tags
Commits on Jul 7, 2012
  1. bump to 2.11.0

    dchelimsky committed Jul 7, 2012
Commits on Jun 27, 2012
  1. Update changelog.

    myronmarston committed Jun 27, 2012
  2. Merge pull request #156 from amarshall/master

    myronmarston committed Jun 27, 2012
    Raise RuntimeError instead of Exception by default in and_raise to match Ruby's default
Commits on Jun 25, 2012
  1. Cleanup whitespace.

    myronmarston committed Jun 25, 2012
    (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 24, 2012
  1. Fix `should_receive` to preserve null object behavior.

    myronmarston committed Jun 24, 2012
    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 18, 2012
Commits on Jun 15, 2012
  1. refactor: rename ExpectationChain to PositiveExpectationChain

    dchelimsky committed Jun 15, 2012
    Also extract base ExpectationChain.
Commits on Jun 11, 2012
Commits on Jun 8, 2012
  1. Refactor away the use of #its.

    myronmarston committed Jun 8, 2012
    #its is going away in rspec-core at some future point, so we shouldn't use it here.
Commits on Jun 7, 2012
  1. Add `Constant.original` API to query rspec-mocks about stubbed consta…

    myronmarston committed Jun 7, 2012
    This needs to be documented, but I want to get feedback from others before spending effort on that.
  2. Return stubbed value rather than original value from stub_const.

    myronmarston committed Jun 7, 2012
    This allows chaining:
      stub_const("Foo", double).stub(:foo)
Commits on Jun 4, 2012
  1. Merge pull request #147 from c42engineering/issue123

    dchelimsky committed Jun 4, 2012
    Issue #123: Improved error message when user forgets to stub a method with a default.
  2. Issue #123: Improved error message when user forgets to stub a method…

    Neha Kumari committed Jun 4, 2012
    … with default behavior.
Commits on Jun 3, 2012
  1. Refactor constant stubbers a bit.

    myronmarston committed Jun 3, 2012
    This is based on @justinko's suggestions:
    #146 (comment)
  2. Replace duplicated README content with a link.

    myronmarston committed Jun 3, 2012
    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.
Commits on Jun 2, 2012
  1. Add cukes for new stub_const feature.

    myronmarston committed Jun 2, 2012
    Closes #144.
  2. Remove unused method.

    myronmarston committed Jun 1, 2012
    For #144.
  3. Fix a constant stubbing edge case.

    myronmarston committed Jun 1, 2012
    stub_const("A::B::C", whatever) cannot work if A::B is defined
    but A::B is not a module.
    For #144.
  4. Remove the bang from our #stub! methods.

    myronmarston committed Jun 1, 2012
    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.
  5. Always restore original constants.

    myronmarston committed Jun 1, 2012
    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.
  6. First pass at implementing constant stubbing.

    myronmarston committed Jun 1, 2012
    This is almost copied verbatim from rspec-fire.
    For #144.
Commits on May 31, 2012
  1. Merge pull request #145 from pjellis/patch-1

    dchelimsky committed May 31, 2012
    [typo] underscore-ize 'ducktype' in
  2. `:%s/ducktype/duck_type/g`

    pje committed May 31, 2012
Commits on May 25, 2012
  1. Merge pull request #143 from brynary/codeclimate-badge

    dchelimsky committed May 25, 2012
    Add Code Climate badge
  2. Add Code Climate badge

    brynary committed May 25, 2012
Commits on May 24, 2012
  1. `should_receive(x).at_least(:once).and_return(y)` always returns y ev…

    dchelimsky committed May 24, 2012
    …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