Commits on Mar 23, 2012
  1. Merge pull request #8 from myronmarston/splat_args

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

    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.
    myronmarston committed Mar 22, 2012
Commits on Mar 21, 2012
  1. Use the new RSpec::Mocks::TestDouble module if it is available.

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

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

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

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

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

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

    Transfer nested constants
    committed Mar 18, 2012
Commits on Mar 17, 2012
  1. Fix failing spec on 1.8.7.

    On 1.8.7, Module#constants returns an array of strings. On 1.9 it's an array of symbols.  We need to convert the given array to strings on 1.8.7 so the two arrays can be subtracted from each other.
    myronmarston committed Mar 17, 2012
Commits on Mar 14, 2012
  1. Raise a mock expectation error for undefined methods called on class …

    We got this for free when FireClassDouble subclassed RSpec::Mocks::Mock; now that we're using modules, we need to define method_missing.
    myronmarston committed Mar 14, 2012
  2. Assign name to class doubles.

    #name is part of the standard class interface. It's a bit silly to make people stub it.
    myronmarston committed Mar 14, 2012
  3. Ensure class doubles have a readable string representation.

    "MyClass (fire double)" is much more readable than "#<Module:0x00000100956180>".
    myronmarston committed Mar 14, 2012
Commits on Mar 13, 2012
  1. Use a module for a class double.

    This will allow nested constants to be preserved on the class double.
    myronmarston committed Mar 12, 2012
Commits on Mar 11, 2012
  1. Merge pull request #3 from myronmarston/fire_replaced_class_double

    Add fire_replaced_class_double.
    committed Mar 11, 2012
Commits on Mar 5, 2012
  1. Remove unused constant.

    This was used by an earlier version of the specs that I never actually committed. I forgot to remove the constant.
    myronmarston committed Mar 5, 2012
  2. Only reset a constant if it still has the stubbed value.

    If a user modifies a constant in an example, we don't want to change it out under their feet.
    myronmarston committed Mar 5, 2012
  3. Cleanup the implementation of constant stubbing.

    - The constant stubbing has been extracted into its own objects, with a corresponding helper method (stub_const). This allows it to be used on its own to stub a constant that you don't care to put a fire-double in its place.
    - The constant stubbing stuff is a good candidate to be pulled into rspec-mocks some day (since it could exist on its own w/o the rest of rspec-fire).
    - New fluent interface for declaring a fire class double and having it replace the constant: `fire_class_double("Something").as_replaced_constant`.
    - The original interface (fire_replaced_class_double) is still there. At this point I'm not sure which I prefer.
    myronmarston committed Mar 5, 2012
Commits on Mar 2, 2012
  1. Ensure a single unnested undefined constant is handled correctly.

    In this case, `remaining_parts.first` will be nil, and the remove_const call will fail.  const_name is the const we want to remove in this case.
    myronmarston committed Mar 2, 2012
Commits on Mar 1, 2012
  1. Add fire_replaced_class_double.

    fire_replaced_class_double is like fire_class_double, plus it temporarily replaces the named constant with itself.  This is handy when the code-under-test references the named constant.  The double also registers itself with rspec-mocks space to ensure it gets reset after each example.  When it is reset it ensures all constants are as they originally were.
    myronmarston committed Feb 29, 2012
Commits on Jan 31, 2012
  1. 0.2.2

    committed Jan 31, 2012