Skip to content


Subversion checkout URL

You can clone with
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.
Commits on Feb 12, 2011
@dchelimsky dchelimsky regexps in Guardfile 5ac6d83
@dchelimsky dchelimsky fix bug in which multiple chains with shared messages ending in hashes
failed to return the correct value

- also documented stub_chain(:a, :b => :c) format in feature
Commits on Feb 20, 2011
@myronmarston myronmarston Allow users to specify return values by passing a block to #at_least,…
… #at_most and #exactly.

- @mock.should_receive(:to_s).at_least(:once) { "return val" }
- @mock.should_receive(:to_s).at_most(:once) { "return val" }
- @mock.should_receive(:to_s).exactly(:once) { "return val" }

Each of the above now work but previously returned nothing since the block was discarded.

Closes #40.
@myronmarston myronmarston Fix yaml serialization when using Psych.
Without these changes, I was getting SystemStackErrors when calling YAML.dump(stubbed_object) or stubbed_object.to_yaml.

To test this, you may need to reinstall ruby 1.9.2 with psych support.  On OSX with homebrew and rvm, this will do the trick:

brew install libyaml
rvm install ruby-1.9.2 --with-libyaml-dir=/usr/local

Closes #36.
Commits on Feb 26, 2011
@myronmarston myronmarston Don't patch Psych.dump unless Psych is loaded and responds to #dump.
This fixes errors with running the specs on 1.9.2 w/o psych support compiled in.
@dchelimsky dchelimsky docs 6551f1a
@dchelimsky dchelimsky move some specs around 5f02fb6
Commits on Mar 06, 2011
@justinko justinko #as_null_object cucumber feature f89af24
Commits on Mar 08, 2011
@dchelimsky dchelimsky format doc ef127a5
Commits on Mar 23, 2011
@kaiwren kaiwren Not so dependent on a particular ruby implementation. Closes #44 Closes 8e2c1a2
Commits on Mar 25, 2011
@dchelimsky dchelimsky upgrade cucumber and aruba 20e9601
Commits on Mar 28, 2011
@dchelimsky dchelimsky update a couple of specs to more 21st century syntax 82c5d66
@dchelimsky dchelimsky Treat block passed to `with` as a dynamic matcher or a return value, but
not both.

This fixes issue #254 in rspec-core.

The `with` method accepts two forms:

  foo.should_receive(:bar).with(:arg) { ... }
  foo.should_receive(:bar).with { ... }

In the first form, we expect, and when it is received it
returns the value returned by eval'ing the block.

In the second form, the block itself is treated as an argument matcher.
The bug was that it was being eval'd twice because it was being treated
as both an argument matcher and a computed return value.
Commits on Mar 29, 2011
@myronmarston myronmarston Pull gems from github when they are not available locally on the file…
@myronmarston myronmarston Add travis config file. 52356e5
@kaiwren kaiwren Add support for any_instance:
- MyClass.any_instance.stub(:m)
- MyClass.any_instance.should_receive(:m)
- includes stub and mock APIs including
  - and_return, and_raise, and_yield
  - once, twice, exactly, any_number_of_times, never, at_least, at_most

- Closes #46.
- Closes #10.
@alindeman alindeman Use #method_defined? instead of #instance_methods.include?.
- All specs now pass on MRI 1.8.7 and MRI 1.9.2.
@dchelimsky dchelimsky Expect (failing) that any_instance.should_receive should fail if no
instance is created during the course of an example.
@kaiwren kaiwren Got exactly one instance done except for never and any_number_of_times 9483c14
@kaiwren kaiwren Completed handling never and any_number_of_times 81108f0
@kaiwren kaiwren Fixed ordering of missed method names b48d777
Commits on Mar 30, 2011
@alindeman alindeman Add feature for simple any_instance.stub use case 1f64f6d
@alindeman alindeman Add feature for any_instance.should_receive use case d0d5e99
Commits on Mar 31, 2011
@dchelimsky dchelimsky Changlog and some minor tweaks
- removed unnecessary conditional
- reduced nesting in any_instance_spec
Commits on Apr 01, 2011
@alindeman alindeman Add new features to .nav file (for Relish). Closes #50 5deee72
Commits on Apr 02, 2011
@dchelimsky dchelimsky no need for begin/rescue in this example 646ff61
Commits on Apr 03, 2011
@myronmarston myronmarston Only build with the rubies travis has available. ca9c16b
Commits on Apr 10, 2011
@dchelimsky dchelimsky update Gemfile to address build issues with 1.9.1 3e31596
@dchelimsky dchelimsky more rubies for travis 877b268
@dchelimsky dchelimsky Dev: fully qualify class names for 1.9.1 9ae8c92
@dchelimsky dchelimsky add travis build status 1b59f2f
Commits on Apr 17, 2011
@kaiwren kaiwren Ensure that any_instance expectations are properly cleaned up between…
… examples.

- Closes #52.
@dchelimsky dchelimsky some refactoring of any_instance ef65d36
@dchelimsky dchelimsky Only reset any_instance recorder once. 189fda0
@dchelimsky dchelimsky fix scoping issue in spec for 1.9.1 b8d9800
@dchelimsky dchelimsky words in features 66737e5
@dchelimsky dchelimsky Mock#to_ary raises a NoMethodError
- supports Array#flatten with a Mock in the Array
- Closes #31.
@dchelimsky dchelimsky add feature to nav 2c1d323
@dchelimsky dchelimsky prep for 2.6.0.rc1 ce07e70
Commits on Apr 18, 2011
@dchelimsky dchelimsky comment aruba/cukes in Gemfile eb01c90
@dchelimsky dchelimsky update changelog 07feeb7
@dchelimsky dchelimsky bump to 2.6.0.rc2 468352c
@dchelimsky dchelimsky update the changelog 11354e2
Commits on Apr 19, 2011
@dchelimsky dchelimsky reinstate cucumber and aruba ce11e75
Commits on Apr 20, 2011
@dchelimsky dchelimsky doc updates f11203d
@dchelimsky dchelimsky minor refactorings 79cf9aa
Commits on Apr 23, 2011
@kaiwren kaiwren Support multiple calls to any_instance in the same example.
- Closes #54.
Commits on Apr 30, 2011
@dchelimsky dchelimsky prep for 2.6.0.rc3 b023531
Commits on May 01, 2011
@dchelimsky dchelimsky bump to 2.6.0.rc4 0d05d6c
Commits on May 06, 2011
@dchelimsky dchelimsky prep for 2.6.0.rc5 4a02ebc
@dchelimsky dchelimsky prep for rc6 ba78f90
Commits on May 12, 2011
@dchelimsky dchelimsky prep for 2.6.0 3f1d77f