Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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.
base fork: rspec/rspec-mocks
...
head fork: rspec/rspec-mocks
Commits on Aug 31, 2010
@justinko justinko stub_chain.feature
- Closes #13.
f5f187e
@dchelimsky dchelimsky add some doc to stub_chain.feature fee8d4d
@myronmarston myronmarston Removed unused file.
The Macros module is also defined in spec_helper.rb.
c546573
@myronmarston myronmarston Use custom include_method matcher to deal with difference in ruby 1.8…
… vs 1.9.
347ee03
Commits on Sep 01, 2010
@myronmarston myronmarston Remove unused lib/rspec/mocks/extensions.rb file. 3b2b138
Commits on Sep 03, 2010
@myronmarston myronmarston Remove dependency on jeweler.
- Allows us to have an always-up-to-date gemspec.
- Use bundler's build/install/release rake tasks rather than jeweler's.
- One less development dependency.
- No need for a separate VERSION file.
9e03463
Commits on Sep 08, 2010
@dchelimsky dchelimsky exclude ruby-debug from 1.9.1 in Gemfile 80d5a2b
@dchelimsky dchelimsky fully qualify classname for ruby-1.9.1 537838f
Commits on Sep 11, 2010
@dchelimsky dchelimsky Fix regression that broke stub_chain with block format
- obj.stub_chain(:a,:b) { :c }
5f24e7d
@dchelimsky dchelimsky Fixed regression that broke hash format for stub_chain
- obj.stub_chain(:a, :b => :c)
2c23b86
@dchelimsky dchelimsky add history 3c467e9
@dchelimsky dchelimsky fix changelog link in History 9003244
Commits on Sep 12, 2010
@dchelimsky dchelimsky double.as_null_object always returns true for respond_to?
- Closes #16.
972deb5
@dchelimsky dchelimsky prep for beta.21 a58d60c
@dchelimsky dchelimsky bump version to 2.0.0.beta.21 56323d9
Commits on Sep 13, 2010
@dchelimsky dchelimsky When not as_null_object, respond_to? now behaves as expected. dae790f
@dchelimsky dchelimsky adjust history for beta.22 release f36ed16
@dchelimsky dchelimsky bump version to 2.0.0.beta.22 07bc53f
Commits on Sep 26, 2010
@andersondias andersondias Fixing typo 1aea395
Commits on Sep 27, 2010
@dchelimsky dchelimsky rename file e1e288b
Commits on Sep 28, 2010
@myronmarston myronmarston Fixed YAML serialization of a stubbed object.
Previously, the mock proxy would be serialized when #to_yaml is called on a stubbed object.  The mock proxy includes a reference to a proc.  When the yaml string is deserialized with YAML.load, you'd get an "allocator undefined for Proc" TypeError.

This fix prevents the mock proxy from being serialized, so that the object is serialized the same as it would if it hadn't been stubbed.

Note that Marshaling also breaks when Marshal.dump is passed a stubbed object, with a "singleton can't be dumped" error.  I'm not yet sure how to fix this, so I've left a pending spec for it.
79401b2
Commits on Oct 02, 2010
@graaff graaff Explicitly require rspec version to fix broken rdoc task. b61073f
@nbraem nbraem should pass block to expectation block 7e55300
@dchelimsky dchelimsky update history c94a566
@dchelimsky dchelimsky Revert "Fixed YAML serialization of a stubbed object."
This reverts commit 79401b2.
7499777
@myronmarston myronmarston Fixed YAML serialization of a stubbed object.
Previously, the mock proxy would be serialized when #to_yaml is called on a stubbed object.  The mock proxy includes a reference to a proc.  When the yaml string is deserialized with YAML.load, you'd get an "allocator undefined for Proc" TypeError.

This fix prevents stubbing from setting any new instance variables on the stubbed object, so that the YAMl serialization is not affected.
793bd34
@dchelimsky dchelimsky Revert "Fixed YAML serialization of a stubbed object."
This reverts commit 793bd34.
8bb5142
@dchelimsky dchelimsky Revert "Revert "Fixed YAML serialization of a stubbed object.""
This reverts commit 7499777.
d03d399
Commits on Oct 03, 2010
@dchelimsky dchelimsky Raise with unexpected args message instead of NoMethodError when a stub
is specified with args but received with different args.
409b2d0
Commits on Oct 05, 2010
@dchelimsky dchelimsky update history 82891fe
@dchelimsky dchelimsky bump version to 2.0.0.rc 361f315
Commits on Oct 09, 2010
@myronmarston myronmarston Added spec demonstrating mock return value for an edge case.
When a method has been stubbed previously to return a certain value (say, in a before(:each)), and then mocked w/o a return value (say, in a spec, to ensure a method was called), the stubbed value should still be returned.
b8135d5
@myronmarston myronmarston Allow specs to run on ruby 1.8.6. 1f3e0f7
Commits on Oct 10, 2010
@dchelimsky dchelimsky words b342ebf
@dchelimsky dchelimsky add a little relish 39803bd
@dchelimsky dchelimsky rename feature dir 822441c
@dchelimsky dchelimsky reorg some features 539b049
@dchelimsky dchelimsky prep for 2.0.0 0238b34
@dchelimsky dchelimsky update rake tasks a696235
Commits on Oct 11, 2010
@dchelimsky dchelimsky fix copy/paste error in history 4830d09
Commits on Oct 18, 2010
@dchelimsky dchelimsky update versions e2ff749
@txus txus 15719 already fixed in stubbed_message_expectations_spec.rb
- Closes #26.
aefe0ff
Commits on Oct 22, 2010
@dchelimsky dchelimsky update dependencies across development repos 739b892
Commits on Oct 23, 2010
@dchelimsky dchelimsky links to docs 6084658
Commits on Nov 06, 2010
@txus txus Fix Marshal serialization of stubbed objects
- Closes #27.
80ee73d
Commits on Nov 07, 2010
@dchelimsky dchelimsky eliminate some warnings 45e2841
@dchelimsky dchelimsky history 31a9e6b
@dchelimsky dchelimsky bump to 2.1.0 506d9f6
@dchelimsky dchelimsky update relish task d7184c7
@dchelimsky dchelimsky update versions for development ed672c6
Commits on Nov 18, 2010
@dchelimsky dchelimsky tweak (c) beffc1e
Commits on Nov 19, 2010
@dchelimsky dchelimsky Added "rspec/mocks/standalone"
- useful in irb to explore the framework
- also eliminated two require calls per example when using rspec-mocks
  with rspec-core - huge performance boost (20% range)
be136a4
Commits on Nov 21, 2010
@gioele gioele Method calls with expanded arrays require parentheses
This fixes the following warning:

    lib/rspec/mocks/message_expectation.rb:43: warning: `*' interpreted
    as argument prefix

- Closes #30.
46e8577
@dchelimsky dchelimsky History 8d35da8
Commits on Nov 25, 2010
@dchelimsky dchelimsky explain README links to documentation 7b1a6a3
@dchelimsky dchelimsky upgrade to cucumber 0.9.4 6bde64b
Commits on Nov 26, 2010
@dchelimsky dchelimsky guard _this_ 880a2ae
@dchelimsky dchelimsky Fix bug where obj.should_receive(:foo).with(stub.as_null_object) would
pass with a false positive.

- Closes #233.
1ba73c9
Commits on Nov 28, 2010
@dchelimsky dchelimsky more history 15b9327
@dchelimsky dchelimsky prep for 2.2 release 1024474
@dchelimsky dchelimsky bump version to 2.2 280af60
Commits on Nov 30, 2010
@dchelimsky dchelimsky links 58cc515
Commits on Dec 01, 2010
@dchelimsky dchelimsky bump to 2.3.0.pre a063713
Commits on Dec 07, 2010
@dchelimsky dchelimsky add example of explicit stub after as_null_object 80dbde5
Commits on Dec 11, 2010
@myronmarston myronmarston Fix our Marshal extension so that it does not interfere with objects …
…that have their own @mock_proxy instance variable.

Since our Marshal extension is loaded globally and affects every Marshal.dump call, we need to be extra careful not to unintentionally affect other things that rely on it.

- Closes #29.
6da62dc
@dchelimsky dchelimsky history e16666a
Commits on Dec 12, 2010
@dchelimsky dchelimsky align Gemfiles across rspec dev repos 301d1c9
@dchelimsky dchelimsky prep for 2.3.0 release dd336af
Commits on Dec 14, 2010
@dchelimsky dchelimsky bump version to 2.4.0.pre 89fc6cb
Commits on Dec 18, 2010
@dchelimsky dchelimsky dev-support: update relish task ec53f43
Commits on Dec 21, 2010
@dchelimsky dchelimsky reorganize the nav for relish 3c9bf80
Commits on Dec 30, 2010
@dchelimsky dchelimsky syntax cheat sheets for stubs and messae expectations c42ea70
Commits on Dec 31, 2010
@dchelimsky dchelimsky fix changelog link 0358d7f
Commits on Jan 02, 2011
@dchelimsky dchelimsky prep for 2.4.0 release 866f34a
Commits on Jan 16, 2011
@dnurzynski dnurzynski Fix bug: Message expectation counts don't work in combination with a …
…stub

- Closes #28.
- Closes #33.
dc1044a
@dchelimsky dchelimsky update history 4e7ea7d
Commits on Jan 17, 2011
@dchelimsky dchelimsky docs 38a6295
Commits on Feb 05, 2011
@txus txus Fix failure message when message received with incorrect args.
- Closes #34.
77844a3
@dchelimsky dchelimsky changelog eaa4468
@Flameeyes Flameeyes Don't force cucumber presence on Rakefile.
Only define the cucumber tasks if cucumber is available, allowing for the
Rakefile to work without Cucumber installed.

Note that Cucumber is still part of the bundle, so unless you're
disabling bundler as well, this patch has no effect.

See #35 for background.

- Closes #35.
24f8354
@dchelimsky dchelimsky doc tweaks f7e2297
@dchelimsky dchelimsky prep for 2.5 release a6c98bd