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
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Oct 09, 2014
@myronmarston myronmarston Forwardport 3.1.3 release notes.
[ci skip]
883d2a6
Commits on Oct 11, 2014
@samphippen samphippen Use is_a_matcher? in arg_has_valid_description
This fixes #685. It means that we only print descriptions in errors for
matcher objects and not for user objects.
c55d11b
Commits on Oct 19, 2014
@samphippen samphippen Implement diffing between args for mock expectations. 139473d
@samphippen samphippen Add a changelog entry for #751 29ee51d
Commits on Oct 20, 2014
@myronmarston myronmarston Merge pull request #751 from rspec/args-diffing
Use the differ to print diffs when args are mismatched between expectations and calls
3da6cdc
Commits on Oct 21, 2014
@samphippen samphippen Trim line length in error generator cbc739a
Commits on Oct 23, 2014
@samphippen samphippen Merge pull request #802 from rspec/samphippen/trim-error-generator-lines
Trim line length in error generator
4496242
Commits on Oct 24, 2014
@andyw8 andyw8 Fix minor typo (veryifing -> verifying)
c18a943
@myronmarston myronmarston Merge pull request #804 from andyw8/patch-1
Fix minor typo (veryifing -> verifying)
9e9837b
Commits on Oct 27, 2014
@myronmarston myronmarston Split public from private interface of MessageExpectation.
These things were combined all together, which made
it more difficult to tell which was which. Also,
`MessageExpectation` was labeled `@private`, which
prevented these methods from showing up on rubydoc.info.
6ff6beb
Commits on Oct 29, 2014
@myronmarston myronmarston Improve MessageExpectation docs.
- Group the methods.
- Specify return values.
- Remove blank lines that were rendering in
  example output.
5caf5bc
@myronmarston myronmarston Merge pull request #805 from rspec/doc-improvements
Doc improvements
ad64b59
Commits on Oct 30, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
77c156e
Commits on Oct 31, 2014
@myronmarston myronmarston Merge pull request #807 from rspec/update-travis-build-scripts-2014-1…
…0-30-for-master

Updates from rspec-dev (2014-10-30)
5254af2
Commits on Nov 12, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
6a7e960
@myronmarston myronmarston Merge pull request #813 from rspec/update-travis-build-scripts-2014-1…
…1-12-for-master

Updates from rspec-dev (2014-11-12)
4a0271d
@cupakromer cupakromer Updated travis build scripts (from rspec-dev)
58e2300
@JonRowe JonRowe Merge pull request #815 from rspec/update-travis-build-scripts-2014-1…
…1-12-for-master

Updates from rspec-dev (2014-11-12)
7a3b9c8
Commits on Nov 13, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
2c97b39
Commits on Nov 14, 2014
@myronmarston myronmarston Merge pull request #816 from rspec/update-travis-build-scripts-2014-1…
…1-13-for-master

Updates from rspec-dev (2014-11-13)
d1d9b29
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
4521262
@myronmarston myronmarston Merge pull request #817 from rspec/update-travis-build-scripts-2014-1…
…1-13-for-master

Updates from rspec-dev (2014-11-13)
e504e53
Commits on Nov 15, 2014
@JonRowe JonRowe Updated travis build scripts (from rspec-dev)
0879f1c
@JonRowe JonRowe Merge pull request #818 from rspec/update-travis-build-scripts-2014-1…
…1-15-for-master

Updates from rspec-dev (2014-11-15)
d6a89d3
Commits on Nov 21, 2014
@xaviershay xaviershay Remove spy scenario that is wrong level of detail for relish docs.
Behaviour is already covered by specs.
9f0b16a
@JonRowe JonRowe Merge pull request #821 from rspec/remove-spy-docs
Remove spy scenario that is wrong level of detail for relish docs.
32739eb
@myronmarston myronmarston Fix verified doubles when their const has already been stubbed.
Fixes #823.
288eea4
@myronmarston myronmarston Remove unnecessary captured block.
Capturing blocks isn’t free, and `yield` (which
we are already using) performs better than
capturing the block and using `block.call`.
8dae3e8
@myronmarston myronmarston Fix memoization to properly memoize nil.
ead0b5f
Commits on Nov 24, 2014
@JonRowe JonRowe Merge pull request #824 from rspec/fix-instance_double-when-class-con…
…st-stubbed

Fix verified doubles when their const has already been stubbed.
481844b
Commits on Nov 25, 2014
@JonRowe JonRowe Badges are crisper as svg
[skip ci]
cceb0e8
@JonRowe JonRowe Merge pull request #827 from rspec/badges_as_s
Switch readme badges to svg
efda49c
@myronmarston myronmarston Validate invocation args for verified null object doubles.
04e048f
@JonRowe JonRowe Merge pull request #829 from rspec/fix-null-object-verified-double-ar…
…g-verification

Validate invocation args for verified null object doubles.
5198c6d
@myronmarston myronmarston Add a `description` to `receive` matcher. 96fa880
@myronmarston myronmarston Add a description for `receive_message_chain` matcher. c5848c5
@myronmarston myronmarston Add a description for `receive_messages` matcher. 5d8f534
@myronmarston myronmarston Add changelog entry.
626ecd5
@myronmarston myronmarston Merge pull request #828 from rspec/add-description-for-receive-matcher
Add description for matchers
b01f24d
Commits on Nov 28, 2014
@e2 e2 allow verifying doubles to use custom names in exceptions 76b84dd
@e2 e2 add class documentation about named verifying doubles f951977
@e2 e2 mention naming verifying doubles in README
b5985e7
Commits on Nov 29, 2014
@myronmarston myronmarston Merge pull request #826 from e2/issue_825_named_verifying_doubles
allow naming verifying doubles just like ordinary doubles
45e2309
@myronmarston myronmarston Add changelog entry for #826.
[ci skip]
a454e6f
Commits on Nov 30, 2014
@myronmarston myronmarston Make `RSpec::Mocks::Constant.original(name)` handle invalid names gra…
…cefully.

Since this API returns an object that provides lots of details
about the constant (rather than just the original value), it's
not meant to raise errors when given constant names that can’t
resolve or are invalid -- instead the returned object indicates
that the provided name was invalid.
689878e
Commits on Dec 02, 2014
@JonRowe JonRowe Merge pull request #833 from rspec/fix-constant-original-for-bad-cons…
…t-names

Make `RSpec::Mocks::Constant.original(name)` handle invalid names gracefully.
8018b83
Commits on Dec 08, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
addf894
@JonRowe JonRowe Merge pull request #834 from rspec/update-travis-build-scripts-2014-1…
…2-08-for-master

Updates from rspec-dev (2014-12-08)
a60491d
@myronmarston myronmarston Revert "Updated travis build scripts (from rspec-dev)"
This reverts commit addf894.

[ci skip]
85bda90
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
3a9efe0
@myronmarston myronmarston Merge pull request #835 from rspec/update-travis-build-scripts-2014-1…
…2-08-for-master

Updates from rspec-dev (2014-12-08)
739d331
Commits on Dec 09, 2014
@myronmarston myronmarston Rework spec.
Before, it mutated the message expectation after it
had already been used. This was just done as a matter
of convenience in the spec, and wasn’t the core point
of it. (Honestly, I didn’t think about mutation-after-use
at the time).

Now, it still verifies that it can be overridden in
all the same ways, but doesn’t use the expectation
before overriding it. This preserves the important
behavior while opening the door for #778.
1ec04ed
@myronmarston myronmarston Merge pull request #836 from rspec/rework-mutation-spec
Rework spec.
f303b97
Commits on Dec 10, 2014
@samphippen samphippen Make the collection matchers composable with other matchers.
Fixes #801
786b262
@samphippen samphippen Changelog entry for #819
1acff37
@samphippen samphippen Merge pull request #819 from rspec/samphippen/compoasable_argument_ma…
…tchers

Improve composability of collection argument matchers
ea4c222
Commits on Dec 18, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
de9eef7
@myronmarston myronmarston Merge pull request #843 from rspec/update-travis-build-scripts-2014-1…
…2-17-for-master

Updates from rspec-dev (2014-12-17)
edef8c6
Commits on Dec 19, 2014
@myronmarston myronmarston Fix standalone so it doesn’t infect other objects.
This also makes `extend RSpec::Mocks::ExampleMethods`
work properly.

Fixes #845.
ac99800
@JonRowe JonRowe Merge pull request #846 from rspec/isolate-standalone
Fix standalone so it doesn’t infect other objects.
17c7b2d
Commits on Dec 22, 2014
@mrgilman mrgilman Prevent invoked expectations from being modified after they are invoked. 0eb9462
@samphippen samphippen Changelog entry for #837
3f1124e
@samphippen samphippen Merge pull request #837 from rspec/samphippen/prevent-expectation-mod…
…ification

Prevent invoked expectations from being modified after they are invoked.
f74dfe0
Commits on Dec 23, 2014
@imtayadeway imtayadeway Fix typo on README line 380.
* change 'sematically' to 'semantically'
* remove some whitespace from line 55.
f8c1fd8
@myronmarston myronmarston Merge pull request #847 from imtayadeway/fix-readme-typo
Fix typo on README line 380.
85327df
Commits on Dec 28, 2014
@benmoss benmoss Updated travis build scripts (from rspec-dev)
7f70238
@myronmarston myronmarston Merge pull request #849 from benmoss/update-travis-build-scripts-2014…
…-12-27-for-master

Updated travis build scripts (from rspec-dev)
83ee10b
@myronmarston myronmarston YAML::ENGINE has been removed from Ruby 2.2. c152810
@myronmarston myronmarston Address MRI 2.2 warnings (possible reference to past scope).
From ruby/ruby@f5f6218.
It causes 280 warnings in our spec suite :(. The fix is to change the names of
variables and/or `let` definitions so they do not clash.

See https://bugs.ruby-lang.org/issues/10661 for more discussion.
9de9d60
Commits on Dec 29, 2014
@myronmarston myronmarston Merge pull request #850 from rspec/address-2-2-issues
Address 2.2 issues
f176c4b
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
0c50ee3
@tschady tschady fix spelling error
ade129e
Commits on Dec 30, 2014
@myronmarston myronmarston Merge pull request #852 from tschady/tws/fix_spelling
fix spelling error
c6254c4
@myronmarston myronmarston Merge pull request #851 from rspec/update-travis-build-scripts-2014-1…
…2-29-for-master

Updates from rspec-dev (2014-12-29)
8f03c38
@myronmarston myronmarston Handle stubbing IO#write and then calling IO#reopen.
5a0a48c
Commits on Jan 01, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
15637a7
@myronmarston myronmarston Merge pull request #853 from rspec/fix-stub-stderr-error
Handle stubbing IO#write and then calling IO#reopen.
a8808c2
@myronmarston myronmarston Merge pull request #855 from rspec/update-travis-build-scripts-2014-1…
…2-31-for-master

Updates from rspec-dev (2014-12-31)
69de705
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
61b7c17
Commits on Jan 02, 2015
@myronmarston myronmarston Merge pull request #856 from rspec/update-travis-build-scripts-2015-0…
…1-01-for-master

Updates from rspec-dev (2015-01-01)
dd46b28
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
9fe8a21
@JonRowe JonRowe Merge pull request #857 from rspec/update-travis-build-scripts-2015-0…
…1-01-for-master

Updates from rspec-dev (2015-01-01)
e9b6bf3
Commits on Jan 08, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
b0b91f3
@myronmarston myronmarston JRuby has different behavior here.
It doesn’t trigger the `NameError` like other rubies.
692f8c7
@myronmarston myronmarston Merge pull request #858 from rspec/update-travis-build-scripts-2015-0…
…1-07-for-master

Updates from rspec-dev (2015-01-07)
5011331
@myronmarston myronmarston Fix inaccurate doc string in cucumber scenario.
This was apparently a copy/paste error.

Thanks to @aruprakshit for notifying me of this problem.
3d29dd2
Commits on Jan 09, 2015
@JonRowe JonRowe Merge pull request #860 from rspec/fix-cuke-copy-paste-error
Fix inaccurate doc string in cucumber scenario.
83221b3
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
6cc173b
Commits on Jan 10, 2015
@myronmarston myronmarston Forwardport 2.99.3 release notes.
[ci skip]
c10548c
Commits on Jan 11, 2015
@JonRowe JonRowe add an api for customising how verifying doubles are checked 6a7d7d8
@JonRowe JonRowe change api call to pass reference 2e9418b
@JonRowe JonRowe rename const to target to better reflect nature 48eb2d4
@JonRowe JonRowe add test coverage for reference target 379ada8
@JonRowe JonRowe update documentation for new callback 79e2a87
@JonRowe JonRowe rename DirectModuleReference to AnonymousModuleReference to accuratel…
…y reflect when it is used
40f2862
@myronmarston myronmarston Make comment more accurate. 774fd3f
@myronmarston myronmarston Add missing spec coverage for anonymous module verifying doubles.
88f3f4e
@JonRowe JonRowe Merge pull request #832 from rspec/extend_verifying_doubles_api
Add an api for customising how verifying doubles are checked
fd0158f
@myronmarston myronmarston Merge pull request #859 from rspec/update-travis-build-scripts-2015-0…
…1-08-for-master

Updates from rspec-dev (2015-01-08)
44dee47
@myronmarston myronmarston Revert "Updates from rspec-dev (2015-01-08)"
91e6a77
@myronmarston myronmarston Merge pull request #861 from rspec/revert-859-update-travis-build-scr…
…ipts-2015-01-08-for-master

Revert "Updates from rspec-dev (2015-01-08)"
9f5babd
Commits on Jan 15, 2015
@myronmarston myronmarston Refactor odd memoization.
It is odd here because within the matcher, we call
`@expectation = expect`, and within `expect` it was
internally memoizing, which means `@expectation`
was being assigned twice. It’s also dubious to
do so because we want to minimize internal memoization
since a matcher can be re-used against a different
target.
1b264f3
@JonRowe JonRowe docs for object references exposed by #832 callback
da3f322
@JonRowe JonRowe expose object rather than class as target
d868ecb
@myronmarston myronmarston Update spec to reflect the target being the object itself. 7478671
@myronmarston myronmarston Improve docs so they render properly with a YARD server.
While we're at it, remove AnonymousModuleReference -- we don’t need it anymore!
6493f2a
@myronmarston myronmarston Clarify error message.
152cc5e
Commits on Jan 16, 2015
@JonRowe JonRowe Merge pull request #863 from rspec/docs_for_832
Docs for object references exposed by #832 callback
cfaf4ef
@myronmarston myronmarston Provide a clear error when received message args are mutated.
...before a `have_received(...).with(...)` expectation.

Fixes #865.
ed3fb3b
@myronmarston myronmarston Just use `Array#hash`.
As @jferris pointed out, it’s sufficient. Besides
being simpler (and likely faster, though I haven’t
benchmarked it), this does fewer object allocations.
52c69f1
Commits on Jan 17, 2015
@rf- rf- Make and_wrap_original work with any_instance (fix #867)
There were a couple of different issues preventing `and_wrap_original`
from working when used with `any_instance`.
97ba302
@myronmarston myronmarston Merge pull request #869 from brigade/master
Make and_wrap_original work with any_instance
09ceebb
@myronmarston myronmarston Add changelog for #869.
[ci skip]
65d3b65
@JonRowe JonRowe Merge pull request #866 from rspec/refactor-odd-memoization
Refactor odd memoization.
fdbad95
@cupakromer cupakromer Include details on how to run against `master`.
A very common issue is when a user attempts to run against the `master`
branch. Simply pointing to `master` doesn't work. This adds the steps
necessary to use `master`.

We need all of the repos in order to also satisfy any other gems which
may have a dependency on the `rspec` gem.

[ci skip]
d65446b
@cupakromer cupakromer Merge pull request #870 from rspec/help-for-running-master
Include details on how to run against `master`.
04a2d37
Commits on Jan 18, 2015
@JonRowe JonRowe Merge pull request #868 from rspec/address-issue-865
Provide a clear error when received message args are mutated.
da33d26
Commits on Jan 19, 2015
@JonRowe JonRowe update docs for rspec/rspec_rails#1238
[skip ci]
25d4345
@JonRowe JonRowe Merge pull request #864 from rspec/update_docs_for_rr_1238
Amend docs post #832 and rspec/rspec-rails#1238
9191106
@myronmarston myronmarston Reword comment to not use “external” twice.
Thanks to @waterlink for pointing this out.
8a0962a
@myronmarston myronmarston Ignore arg mutations for method calls we are not concerned with.
fc9e9a5
@JonRowe JonRowe Merge pull request #871 from rspec/pr-868-followups
Pr 868 followups
800ea20
Commits on Jan 21, 2015
@myronmarston myronmarston Better formatting for error message. 73ac1f6
@myronmarston myronmarston Deal with verified doubles for classes that redefined `name`.
These sorts of classes worked fine before #824 was
merged, and the switch to using a NamedObjectReference
based on the name broke things for them. This restores
support.
235e43e
@JonRowe JonRowe Merge pull request #873 from rspec/824-followups
824 followups
56392d9
Commits on Jan 22, 2015
@sivagollapalli sivagollapalli FIX# Displaying 'Diff' in new line
3ab98c5
Commits on Jan 27, 2015
@myronmarston myronmarston Improve explanation about verified double argument verification.
Closes #878.
b8a838a
@myronmarston myronmarston Merge pull request #879 from rspec/clarify-verifying-double-arg-verif…
…ication

Improve explanation about verified double argument verification.
d213d26
Commits on Jan 28, 2015
@sivagollapalli sivagollapalli Removed extra space to make left align
9edc017
@sivagollapalli sivagollapalli Added specs for #875
6fc4603
@myronmarston myronmarston Merge pull request #876 from sivagollapalli/issue_875
FIX# Displaying 'Diff' in new line
07ee32f
Commits on Jan 29, 2015
@myronmarston myronmarston Explicitly tag pending specs for ordered/vague count combinations.
This will now print the reason it is pending on CI and skip
them locally since it adds a lot of noise to our output
and we have yet to attempt to address them.
ab93dda
@myronmarston myronmarston Merge pull request #880 from rspec/cleanup-some-pending-specs
Explicitly tag pending specs for ordered/vague count combinations.
a5b4f5b
Commits on Jan 31, 2015
@YorickPeterse YorickPeterse Removed rubysl from the Gemfile.
This hasn't been required anymore since quite a while. Starting with 2.2.0 (if I
remember correctly) Rubinius takes care of ensuring the rubysl Gems are always
available, with or without Bundler.
ac486cd
@myronmarston myronmarston Merge pull request #882 from YorickPeterse/master
Removed rubysl from the Gemfile.
08186cc
Commits on Feb 03, 2015
@myronmarston myronmarston Update changelog for v3.2.0 [ci skip] 90cb471
@myronmarston myronmarston Release 3.2.0
d7ed065
@myronmarston myronmarston Bump version to 3.3.0.pre
44d81d6
Commits on Feb 04, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
1184e78
Commits on Feb 05, 2015
@myronmarston myronmarston When stubbing `MyClass.new` verify against `MyClass#initialize`.
Closes #883.
990b017
@myronmarston myronmarston Merge pull request #885 from rspec/update-travis-build-scripts-2015-0…
…2-03-for-master

Updates from rspec-dev (2015-02-03)
44d2557
@myronmarston myronmarston Pend specs to deal with jruby/jruby#2565.
8056a9e
@JonRowe JonRowe Merge pull request #886 from rspec/use-initialize-signature-for-new
When stubbing `MyClass.new` verify against `MyClass#initialize`.
0ab18a3
Commits on Feb 09, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
7cd14ae
@myronmarston myronmarston Merge pull request #888 from rspec/update-travis-build-scripts-2015-0…
…2-08-for-master

Updates from rspec-dev (2015-02-08)
f03b686
@myronmarston myronmarston Remove unused method.
a77686b
@JonRowe JonRowe Merge pull request #889 from rspec/remove-unused-method
Remove unused method.
250a5de
Commits on Feb 11, 2015
@imtayadeway imtayadeway Fix argument formatting for received. 08eb0f2
@imtayadeway imtayadeway Unify similar args description methods.
ErrorGenerator#actual_method_call_args_description and
ErrorGenerator#expected_method_call_args_description were almost
identical. This change moves the common code from both into the
ErrorGenerator#method_call_args_description method and yields to a block
which lets the caller decide on what condition to show the formatted args.
7f6e065
Commits on Feb 12, 2015
@JonRowe JonRowe Merge pull request #891 from imtayadeway/fix-received-matcher-descrip…
…tions

Fix argument formatting for received.
91d3f5a
@JonRowe JonRowe changelog for #891
[skip ci]
3828148
Commits on Feb 17, 2015
@myronmarston myronmarston Clarify changelog for #891. ddb4c20
@myronmarston myronmarston Cleanup whitespace. b096ec9
@myronmarston myronmarston Update to new rspec-support library wide checks. 3fff060
@myronmarston myronmarston Don’t load stringio unnecessarily. 394d373
@myronmarston myronmarston Deal with the fact we load securerandom on 1.9.2. 0d3e0f8
@myronmarston myronmarston Update based on latest rspec-support requires.
fec1b7f
@JonRowe JonRowe Merge pull request #894 from rspec/allowed-stdlib
Allowed stdlib
63a65c2
@imtayadeway imtayadeway Add more specific "does not implement" messages.
The unimplemented error message gives no indication of whether the
object is a class or instance double. This change passes that object to
the error generator so that it can create a more specific message
depending on whether it is an instance or class double. It defaults to
the original "<object> does not implement <method>" for anything else.

#838
4b1b008
Commits on Feb 18, 2015
@JonRowe JonRowe Merge pull request #896 from imtayadeway/instance-class-double-verifi…
…cation

Add more specific "does not implement" messages.
4777fd0
@JonRowe JonRowe change for #896
[skip ci]
149293e
Commits on Feb 23, 2015
@myronmarston myronmarston Make doc string more accurate. 8e56f83
@myronmarston myronmarston Stop calling methods on args passed to a stubbed method.
Any method call may mutate an object, so we can't safely call
anything on a passed argument.

This reverts the following PRs and commits:

* #871:
  * 8a0962a ("Reword comment to not use “external” twice.")
  * 52c69f1 ("Just use `Array#hash`.")
* #868:
  * ed3fb3b ("Provide a clear error when received message args are mutated.")
  * fc9e9a5 ("Ignore arg mutations for method calls we are not concerned with.")

This adds notes to the docs about using mutated args
with `have_received(…).with(…)`.

Fixes #892.
8d071d5
@myronmarston myronmarston Fixup formatting of `@example` YARD comments.
- No blank line after `@example`; YARD renders that
  as a blank line of code.
- Standardize on 2 spaces.
62236cd
@JonRowe JonRowe Merge pull request #900 from rspec/revert-arg-mutation-error
Revert arg mutation error
4c0664c
Commits on Feb 24, 2015
@myronmarston myronmarston Forwardport 3.2.1 release notes.
c455fc5
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
d437b03
Commits on Feb 25, 2015
@myronmarston myronmarston Merge pull request #902 from rspec/update-travis-build-scripts-2015-0…
…2-24-for-master

Updates from rspec-dev (2015-02-24)
b610169
Commits on Mar 06, 2015
@myronmarston myronmarston Simplify `and_raise`.
Passing args directly to `raise` is much simpler :).
6c0c8d1
Commits on Mar 07, 2015
@nicholasjhenry nicholasjhenry Fix broken links in 'Further Reading'
ad0c0ac
Commits on Mar 08, 2015
@soulcutter soulcutter Merge pull request #906 from rspec/simplify-and-raise
Simplify `and_raise`.
922273f
@JonRowe JonRowe Merge pull request #907 from nicholasjhenry/fix-readme-links
Fix broken links in 'Further Reading'
f190e66
Commits on Mar 10, 2015
@imtayadeway imtayadeway Provide a message if the wrong double is used.
If an undefined method is stubbed on an instance double, the error generator
will check to see if it is defined on the class level and provide a
message to indicate that this may be what was meant. It also does the
converse for class doubles and instance methods.

#838
cd51da8
@myronmarston myronmarston Merge pull request #908 from imtayadeway/instance-class-double-verifi…
…cation-message

Provide a message if the wrong double is used.
352a57d
@myronmarston myronmarston Update changelog to mention #908.
[ci skip]
fbaf33e
Commits on Mar 15, 2015
@JonRowe JonRowe correct documentation to highlight the expected behaviour
[skip ci]
7b13b85
@myronmarston myronmarston Merge pull request #911 from rspec/correct_docs_for_910
Correct any_instance documentation.
9597d6f
Commits on Mar 16, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
0a007fa
@JonRowe JonRowe Merge pull request #912 from rspec/update-travis-build-scripts-2015-0…
…3-15-for-master

Updates from rspec-dev (2015-03-15)
68a3919
Commits on Mar 20, 2015
@samphippen samphippen Make message expectations raise at the end of tests even if they have…
… eagerly raised.
e147665
@samphippen samphippen Changelog entry for #884
fb2e0f1
@samphippen samphippen Merge pull request #884 from rspec/samphippen/fix-874
Ensure negative expectations raise during RSpec verification time.
84e7da2
@samphippen samphippen Fix changelog entry for #884
b5e514d
Commits on Mar 24, 2015
@johnceh johnceh Small fix for typo
b674f28
@JonRowe JonRowe Merge pull request #913 from johnceh/typo-fix-on-documentation
Small fix for typo
838fc71
Commits on Apr 03, 2015
@johnceh johnceh Fixes issue 915 - displaying invalid counts instead of irrelevant arg…
…uments
e575da3
Commits on Apr 09, 2015
@johnceh johnceh Fixes Issue 915 - Second part fix for error message to include counts…
… for expect-to-receive error messages
3f72f4c
@myronmarston myronmarston Merge pull request #918 from johnceh/issue-915/fixes-invalid-count-er…
…ror-message

Fixes issue 915 - displaying invalid counts instead of irrelevant arguments
89f6800
@myronmarston myronmarston Add changelog entries for #918. 97703a8
@myronmarston myronmarston Reduce object allocations in error generator.
`' (' + string + ')'` allocates 4 strings:

* `' ('`
* The string returned by `' (' + string` (let's call it `str2`)
* `')'`
* The string returned by `str2 + ')'`

In contrast, `" (#{times(index)})"` only allocates one string.

Likewise, `[str1, str2].join` allocates an array only to join
it, where as `"#{str1}#{str2}"` avoids the array allocation.
6d8b31b
@myronmarston myronmarston Standardize fail matchers.
This mirrors an earlier change in rspec-expectations:

rspec/rspec-expectations@b4b4fbb
3158068
@myronmarston myronmarston Leverage `fail_including` for shorter matcher expressions. 4ef378f
@myronmarston myronmarston Move comment over from `once_counts_spec.rb`.
It applies here, too, and I hope we'll address it at some point.
3d6bfa1
@myronmarston myronmarston Move away from using arg splats for error generation.
We were splatting and resplatting through the error generation
process, but it was a bit confusing.  I suspect it performs
worse than just passing the same array around anyway.

One concrete improvement from this is that we had some places
where we were passing the args from a single method call to
an method accepting a splat of args_from_multiple_calls. Wrapping
the single-call in an array makes the conversion more explicit.
a1027d2
@myronmarston myronmarston Standardize on `args_for_multiple_calls`.
It’s confusing to call it `args` when it’s a list
of received args for multiple calls (an array-of-arrays).
f40fce0
@myronmarston myronmarston Inline `arg_message`. 86e007f
@myronmarston myronmarston Move methods into `private` section.
They should not be public.
664fe81
@myronmarston myronmarston `yield` performs better than `block.call` so use it.
dd8f8fd
Commits on Apr 10, 2015
@JonRowe JonRowe Merge pull request #922 from rspec/pr-918-followups
Pr 918 followups
077e377
@myronmarston myronmarston Prefer `anything == object` over `object == anything`.
Many users have objects that implement `==` wrongly
in a way that can raise errors when given an object
of an unexpected type.  This avoids that situation
by checking equality with `anything` instead.

See rspec/rspec-expectations#732 for one case of this.
27b9402
@samnang samnang Matching arguments with RSpec matchers
8a33557
@myronmarston myronmarston Merge pull request #925 from samnang/matching_arguments_with_rspec_ma…
…tcher

Matching arguments with RSpec matchers
511071e
Commits on Apr 11, 2015
@JonRowe JonRowe Merge pull request #924 from rspec/work-around-objects-with-buggy-equals
Prefer `anything == object` over `object == anything`.
40911d5
Commits on Apr 13, 2015
@JonRowe JonRowe avoid using bare raise_error 34e91d9
Commits on Apr 14, 2015
@JonRowe JonRowe support `fail_with { }` and `fail {}` 92bcc34
@JonRowe JonRowe be consistent and use fail/fail_with everywhere
beecd5c
@myronmarston myronmarston Merge pull request #929 from rspec/update_mocks_to_avoid_bare_raise_e…
…rror

Avoid using bare raise_error
b973a76
Commits on Apr 17, 2015
@sivagollapalli sivagollapalli Registering doubles using ObjectInspector ada66cf
@myronmarston myronmarston Improve double formatting in error messages.
- Include `Double` vs `InstanceDouble` vs
  `ClassDouble` vs `ObjectDouble`.
- Handle doubles that have prevented or stubbed
  `instance_variable_get`.

For rspec/rspec-expectations#688.
8fda7ef
@myronmarston myronmarston Rename unused `@name` variable. 3e6f263
@myronmarston myronmarston Only unwrap the formatted double for the case that uses parens.
It’s nice to have the `#<...>` bit otherwise.
c8abe4e
@myronmarston myronmarston Move double formatting logic into `inspect`.
- Makes doubles format well in data structures and
  diffs in failures.
- The `inspect` we had before really wasn’t very good;
  this is much better, anyway.
4a894ea
@myronmarston myronmarston Add changelog entry. 3d9fb62
@myronmarston myronmarston Update cukes to match new test double formatting.
3f254fa
@myronmarston myronmarston 1.9.2 is having problems with `object_double(:foo)`.
1a7cafe
Commits on Apr 18, 2015
@JonRowe JonRowe Merge pull request #932 from rspec/double-inspection
Improve how doubles are represented in failures
9ee3e3a
Commits on Apr 22, 2015
@imtayadeway imtayadeway Fix typo in receive example description.
cb13992
@myronmarston myronmarston Merge pull request #935 from imtayadeway/tw/fix-receive-spec-typo
Fix typo in receive example description.
18277e2
Commits on Apr 30, 2015
@samphippen samphippen Benchmark and optimise object allocations for a simple mocking case
d079094
@samphippen samphippen Merge pull request #936 from rspec/allocation-optimsiations
Benchmark and optimise allocations
dcc7b13
Commits on May 03, 2015
@ShPakvel ShPakvel fix typo for hide_const result printout
8e32f2e
@JonRowe JonRowe Merge pull request #942 from ShPakvel/fix_typo_in_mutating_constants_…
…readme

fix typo for hide_const usage result printout
4cc6d61
Commits on May 05, 2015
@JonRowe JonRowe Updated travis build scripts (from rspec-dev)
e5d1c45
@JonRowe JonRowe Merge pull request #944 from rspec/update-travis-build-scripts-2015-0…
…5-05-for-master

Updates from rspec-dev (2015-05-05)
f93f9d0
@JonRowe JonRowe rename callback for verifying doubles 006a56c
@JonRowe JonRowe use the verifying double callback when creating any_instance and norm…
…al verifying partial doubles
e5bfbcb
@JonRowe JonRowe changelog for #940
1826212
Commits on May 06, 2015
@JonRowe JonRowe Merge pull request #940 from rspec/improve_verifying_double_callback
Rename verifying double callback and expand to partial doubles.
e381761
Commits on May 07, 2015
@fabschurt fabschurt Correct the grammar of a phrase 2e7f675
@fabschurt fabschurt Remove a hyphen 510ca9f
@fabschurt fabschurt Increase line length to fix an odd-looking (too short) line on Relish
The hyperlink to `object_double` in the Markdown source makes the line
longer than it is when rendered on Relish, and the line break after
"work if you" thus makes the line look too short compared to others on
Relish.
e598f15
Commits on May 08, 2015
@JonRowe JonRowe Merge pull request #945 from fabschurt/fix-features-cosmetics
[Doc] [Features] Some cosmetic enhancements
d211c74
Commits on May 13, 2015
@myronmarston myronmarston Remove unused method. 4ef239a
@myronmarston myronmarston Use error generator for `any_instance` errors.
Fixes #646.
91d8960
@myronmarston myronmarston Refactor: convert more errors to use error generator. 4f37fb5
@myronmarston myronmarston Use the rspec-support failure notifier for mock expectation failures.
879eb4f
@myronmarston myronmarston Merge pull request #946 from rspec/aggregate-failures
Aggregate failures
cbda94b
Commits on May 21, 2015
@myronmarston myronmarston Make `have_received` compatible with `aggregate_failures`.
Fixes #952.
0e7052c
@JonRowe JonRowe Merge pull request #953 from rspec/aggregate-failures-fixes
Make `have_received` compatible with `aggregate_failures`.
9aeba8b
@myronmarston myronmarston Distinguish between the original method and a method missing proc.
Before, we would return a proc that invokes `method_missing`
from `original_method`, but it wasn’t a `Method` object
and couldn’t be bound, leading to `NoMethodError` in an
edge case.

Fixes #951.
de4f78c
@myronmarston myronmarston Merge pull request #954 from rspec/fix-951
Distinguish between the original method and a method missing proc.
2e74741
Commits on May 23, 2015
@myronmarston myronmarston Ignore spec/examples.txt c54bcf3
@myronmarston myronmarston Use rspec-support's ObjectFormatter to format arguments.
This ensures are improved formatting for things like time objects
and matchers is used.

Fixes #898.
1449556
Commits on May 25, 2015
@JonRowe JonRowe Merge pull request #955 from rspec/update-to-object-formatter
Update to object formatter
55d49a8
Commits on May 27, 2015
@myronmarston myronmarston Update changelog.
[ci skip]
9c192ce
@myronmarston myronmarston Prevent received count from being double-incremented.
For #956.
bc3d005
@JonRowe JonRowe Merge pull request #957 from rspec/fix-double-increment
Prevent received count from being double-incremented.
7181faa
@JonRowe JonRowe Changelog for #957
[skip ci]
f82c024
Commits on May 28, 2015
@takiy33 takiy33 Removed deprecated option from .gemspec
e94ce3e
@JonRowe JonRowe Merge pull request #959 from takiy33/takiy33-patch-1
Removed deprecated option from .gemspec
c2e12d3