Permalink
Commits on Sep 20, 2012
  1. 2.11.3 release.

    myronmarston committed Sep 20, 2012
Commits on Sep 19, 2012
  1. 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 committed Sep 18, 2012
Commits on Sep 17, 2012
  1. Merge bug-fix commits from master into 2-11-maintenance.

    This is in prep for the 2.11.3 release.
    
    For future reference, I used the following steps to do this, starting
    from a checkout of master:
    
    * `git checkout -b bug_fixes_from_master`
    * `git rebase -i v2.11.0`
    * Removed the non-bug fix commits from the list of commits
      during interactive rebase.
    * `git checkout 2-11-maintenance`
    * `git merge bug_fixes_from_master`
    
    Conflicts:
    	Changelog.md
    	Gemfile-custom.sample
    	lib/rspec/mocks/any_instance/recorder.rb
    	lib/rspec/mocks/stub_const.rb
    	spec/rspec/mocks/any_instance_spec.rb
    myronmarston committed Sep 17, 2012
Commits on Aug 12, 2012
  1. 2.11.2 release.

    myronmarston committed Aug 12, 2012
Commits on Aug 11, 2012
  1. Fix use of const_defined? and const_get so it ignores top-level const…

    …ants.
    
    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")).
    myronmarston committed Aug 10, 2012
Commits on Aug 10, 2012
  1. Merge pull request #173 from jredville/master

    Clean up formatting for Relish
    alindeman committed Aug 10, 2012
  2. fix formatting for relish

    jredville committed Aug 10, 2012
Commits on Aug 5, 2012
Commits on Aug 3, 2012
  1. Update changelog.

    myronmarston committed Aug 3, 2012
  2. Cleanup spec a bit.

    myronmarston committed Aug 3, 2012
  3. Fix any_instance to handle methods defined on superclasses.

    Previously, the recorder implementation created a SystemStackError.
    
    Closes #152.
    daneget committed with myronmarston Aug 2, 2012
Commits on Aug 1, 2012
Commits on Jul 11, 2012
  1. 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.
    myronmarston committed Jul 11, 2012
Commits on Jul 10, 2012
  1. Merge pull request #161 from ugisozols/master

    Add missing 'be's to the README.
    justinko committed Jul 10, 2012
  2. 2.11.1 release.

    myronmarston committed Jul 10, 2012
Commits on Jul 9, 2012
  1. 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)
      double.foo
    
    ..it used to return "bar", but due to my changes in a5f296e it was returning `self`.
    myronmarston committed Jul 9, 2012
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

    Raise RuntimeError instead of Exception by default in and_raise to match Ruby's default
    myronmarston committed Jun 27, 2012
Commits on Jun 25, 2012
  1. 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
    myronmarston committed Jun 25, 2012
Commits on Jun 24, 2012
  1. Fix `should_receive` to preserve null object behavior.

    Given a case like:
    
       double = mock.as_null_object
       double.should_receive(:bar)
    
    ...`double.bar` 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.
    myronmarston committed Jun 24, 2012
Commits on Jun 18, 2012
Commits on Jun 15, 2012
  1. refactor: rename ExpectationChain to PositiveExpectationChain

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

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

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

    This allows chaining:
    
      stub_const("Foo", double).stub(:foo)
    myronmarston committed Jun 7, 2012