Permalink
Commits on Jul 9, 2012
  1. RSpec 2.11 is out.

    myronmarston committed Jul 9, 2012
Commits on Jun 11, 2012
  1. Update rspec-fire to work with port of stub_const in rspec-mocks.

    myronmarston committed Jun 11, 2012
    rspec/rspec-mocks#146
    
    Note that this removes support for rspec 2.0...2.10
    (and rspec 2.11 isn't out yet), but there's no reason to
    maintain stub_const logic here now that it has been ported
    to rspec-mocks, and if you're updating to the latest rspec-fire
    than we assume you're probably doing the same with rspec.
  2. Lock to master branch of rspec-mocks for now.

    myronmarston committed Jun 11, 2012
    Once rspec 2.11 is released w/ the port of stub_const from here, we can change this so that it isn't locked to the git repo.
Commits on May 9, 2012
  1. Allow both instance and class doubles for unloaded classes.

    myronmarston committed May 9, 2012
    Previously, if you used both fire_double("Foo") and fire_replaced_class_double("Foo"), and Foo was not defined, stubbing or mocking a method on the fire double would fail because ConstantStubber.original_value_for returned nil for "Foo" (since it was originally unloaded), but the constant lookup would succeed and it would try to verify the implementation against the class stub.
    
    Now, ConstantStubber.find_original_value_for yields if the given class has been stubbed, and the value it yields can be nil if it was originally unloaded.  This allows us to support this edge case.
Commits on Apr 29, 2012
Commits on Apr 1, 2012
  1. 0.4.0 release

    xaviershay committed Apr 1, 2012
  2. Merge pull request #13 from myronmarston/allow_fire_double_and_class_…

    xaviershay committed Apr 1, 2012
    …double_for_same_class
    
    Allow fire double and class double for same class
  3. Merge pull request #11 from myronmarston/ignore_block_arg

    xaviershay committed Apr 1, 2012
    Don't count block params when determining the max arity.
Commits on Mar 29, 2012
  1. Merge pull request #12 from myronmarston/fix_travis_build

    xaviershay committed Mar 29, 2012
    Fix travis build
Commits on Mar 28, 2012
  1. Use original const value when checking implementation for fire_double.

    myronmarston committed Mar 28, 2012
    This allows fire_double and fire_replaced_class_double to both
    be used in the same example with the same doubled class.
  2. Fix specs on 1.8.7.

    myronmarston committed Mar 28, 2012
    The #stub! specs were generating failures:
    
      received unexpected message :stub
    
    Changing from an alias to a direct delegation fixed the problem.  Weird.  I don't understand that at all :(.
  3. Revert "Bump minimum rspec requirement to 2.6."

    myronmarston committed Mar 28, 2012
    This reverts commit 1b3ba96.
    
    This commit didn't have the intended affect, anyway, and is no longer
    needed.
  4. Ensure #stub! works (as an alias for #stub).

    myronmarston committed Mar 28, 2012
    This should fix the build on rspec 2.5 and 2.6 as well.
  5. Don't count block params when determining the max arity.

    myronmarston committed Mar 28, 2012
    Before this change, the following worked improperly:
    
      class A
        def m(a, &b)
        end
      end
    
      fire_double("A").stub(:m).with(:two, :arguments)
    
    The block arg was counted previously so this passed even though it should not.
  6. Bump minimum rspec requirement to 2.6.

    xaviershay committed Mar 28, 2012
    2.5 passes on my machine, but not on travis, and I have no inclination
    to investigate further. Hopefully this will just make the issue go away.
Commits on Mar 27, 2012
  1. Merge pull request #10 from freelancing-god/hash-shortcut

    xaviershay committed Mar 27, 2012
    Allow for RSpec's hash shortcuts with the stub method.
Commits on Mar 24, 2012
  1. Merge pull request #9 from myronmarston/allow_stub_hash

    xaviershay committed Mar 24, 2012
    Allow `fire_double("Class", :foo => 17)` syntax.
Commits on Mar 23, 2012
  1. Allow `fire_double("Class", :foo => 17)` syntax.

    myronmarston committed Mar 23, 2012
    The ivars @__checked_methods and @__method_finder must be set before supering, so that when the superclass initializer calls #stub with each given message, the implementation can be checked.  Previously, you would get a 'nil is not a symbol' error.
  2. Merge pull request #8 from myronmarston/splat_args

    xaviershay committed Mar 23, 2012
    Handle default args and splat args properly.
Commits on Mar 22, 2012
  1. Handle default args and splat args properly.

    myronmarston committed Mar 22, 2012
    Unfortunately, on 1.8, there's no way to tell the difference between default args and splat args, so we can't fully support both. I've opted to be more liberal and treat it as a possible splat arg. This allows stubbing #with(1, 2) for a method like m(a=5), but I figure that's better than not allowing stubbing #with(1, 2) for a method like m(*a).
    
    On 1.9, it gives us the means of telling the difference between defaults and splats, so we handle it correctly.
Commits on Mar 21, 2012
  1. Use the new RSpec::Mocks::TestDouble module if it is available.

    myronmarston committed Mar 21, 2012
    See the following links for the background on this.
    
    * rspec/rspec-mocks#117
    * rspec/rspec-mocks@af3f296
Commits on Mar 18, 2012
  1. 0.3 release

    xaviershay committed Mar 18, 2012
  2. Fix dates in HISTORY.

    xaviershay committed Mar 18, 2012
  3. Merge pull request #6 from myronmarston/fix_travis_failures

    xaviershay committed Mar 18, 2012
    Fix travis failures
  4. Fix #inspect on a fire class double for rubinius.

    myronmarston committed Mar 18, 2012
    Rubinius has a bug this is working around:
    
    rubinius/rubinius#1619
  5. Fix our rspec-mocks monkey patch to work on 1.8.

    myronmarston committed Mar 18, 2012
    On 1.8, #private_instance_methods returns an array of strings, not an array of symbols.
  6. Merge pull request #5 from myronmarston/transfer_nested_constants

    xaviershay committed Mar 18, 2012
    Transfer nested constants