Skip to content
This repository
  • 996 commits
  • 192 files changed
  • 5 comments
  • 14 contributors
This comparison is big! We're only showing the most recent 250 commits
Jan 03, 2014
Myron Marston Update teardown spec.
We're going to change how pure test doubles behave
after teardown, so update this to focus on partial
doubles (which will not be changed).
0df4884
Myron Marston Make test doubles self-destruct after the example completes.
Test doubles are not designed to be used outside of
the example they were created in.
f83810b
Myron Marston No need for ProxyForNil to have its own file. 3138bba
Myron Marston Centralize error classes in error_generator.rb.
Also, document some of them as public since
users may want to rescue them, or specify
a block will raise one of these errors
(e.g. in an rspec-mocks extension gem).
b639f7e
Myron Marston Move error_space.rb into space.rb
There's no need for a separate file and there's
going to be a bit of interaction between multiple
spaces at various layers in a stack so having it
in one file will make it easier to see how it relates.
83e56b0
Myron Marston Remove an unnecessary layer of indirection.
* This should be faster (but almost certainly not
  noticably so).
* It was odd to expose these methods off of `RSpec::Mocks`
  given that they are not intended for usage outside
  rspec-mocks.
* We weren't getting any benefit from these except
  for not having to type `.space`.
e685867
Jan 04, 2014
Myron Marston Having a private `pretty_print` method causes problems.
When rspec-expectations tries to diff the object in
a failure message, it blows up when the `pp` library
tries to print it.
513bdb1
Myron Marston Refactor: store const mutators in mock space.
This unifies global storage of modified things in one place.
9da93fd
Myron Marston Re-work spec file a bit.
- Make it more general (it's not just about stubbing).
- Remove unused lines.
- Improve doc output (`include_examples` does not
  create a nested group).
7c94a6f
Myron Marston Don't allow const stubbing/hiding from before(:all). d89e680
Jan 06, 2014
Myron Marston Refactor space tracking so it uses a stack and allows nesting. c28b379
Myron Marston Add RSpec::Mocks.with_temporary_scope.
Closes #240.
3dcef6d
Myron Marston Clean up expectation ordering.
- It was duplicated in Proxy.
- Makes more sense to initialize it in Space init.
98f065e
Myron Marston Simplify spec.
rspec-mocks lacks the necessary sandboxing to safely
define and run examples from within examples.
rspec-core has and uses this but it's not exposed
for use here.

Instead, we can just trigger the teardown/setup
that happens between examples.

This fixes some rspec-mocks space leakage
that was happening.
d2b335e
Myron Marston Move mock_space_spec specs into space_spec.rb
Not sure how we wound up with two separate files, anyway.
90cf550
Myron Marston Remove unnecessary collection clearing.
Since we now use a new space instance per example,
we don't need to clear its collections when resetting.
Before this was necessary because we kept a space instance
that we would keep using for the lifetime of the process.

Constant mutators weren't being reset idempotently, so I
had to tweak them a bit.
fab5210
Myron Marston Add changelog entry for test-double self-destruction.
[ci skip]
3ab7925
Jan 07, 2014
Myron Marston Indent `private` at same level as class.
This is our preferred convention.
c08a408
Jan 09, 2014
Myron Marston Merge pull request #519 from rspec/lifecycle-space-fixups
Lifecycle/space fixups
8615dc2
Myron Marston Fix indentation. 4cf7d25
Myron Marston Add spec for `have_received` lifecycle issue. 949e2d6
Jan 10, 2014
Myron Marston Fix null_object double visibility bug.
The error being raised had the word "private" in
it only because the method itself had that in its
name, but this did not indicate it was raising
the normal "private method called" error raised
by ruby.
74e7990
Myron Marston Allow null object verified doubles to receive private methods using `…
…send`.

This mirrors the behavior of the real object.
37300da
Myron Marston Fix 1.8.7.
I'm not sure why, but aliasing `__send__` to `send`
on 1.8.7 doesn't work correctly. Defining the alias
manually does, for some reason.

While we're at it, it makes more sense to define
`__send__` as primary and `send` as secondary,
as it's more likely users will stub `send`
(e.g. for an `email` object).
50f4d56
Myron Marston Add specs to ensure `send` can be stubbed. 8776594
Myron Marston Work around JRuby bug. c601d58
Jan 11, 2014
Myron Marston Merge pull request #524 from rspec/fix-null-object-visibility
Fix null object visibility
7aaa623
Jan 22, 2014
Myron Marston Delete unneeded script.
[ci skip]
ed10867
Myron Marston Update test-all script so it builds against core and expectations.
If we break those gems we want to be notified about it.
c81e9f9
Myron Marston Update .travis.yml.
- Build against ruby-head and jruby-head but allow failures.
- We don't need the before_install stuff anymore.
ef7fcbc
Jan 23, 2014
Myron Marston Add travis_retry to bundle install. 7f0828a
Jan 24, 2014
Myron Marston Revamp travis build.
- Only run the one-by-one specs and the builds for other
  gems on MRI. JRuby and RBX are too slow and flakey.
- Before `bundle install`, clone all repos to sibling dirs.
  This makes the later bundle installs for the other repos
  *much* faster since they don't have to re-clone the rspec
  repos and can instead share the same checkouts.
- Using a common bundle directory to minimize the number of
  gems that have to be re-installed.
- Reinstate using bin/cucumber for faster cuke runs.
  Running w/o bundler removes the "bundler tax" of having
  bundle to runtime checks everytime we shell out to `rspec`.
- Reorganize build scripts for easier maintenance.
- Make certain parts of the build idempotent, so that, for
  example, the main repo isn't re-cloned or the specs re-run.
  This will allow us to re-use these scripts in all repos
  w/o changing them. Otherwise each would have to be a bit
  different and skip the extra clone and run of their own
  repo and specs.
d58bab9
Myron Marston We're still having cucumber problems with bin/cucumber :(. a828f11
Myron Marston Use `bundle exec cucumber` only on 1.9.2.
It's the only ruby that gets a system stack error
from the `bin/cucumber` approach. `bin/cucumber`
is faster as it avoids loading bundler at runtime.
34be259
Jon Rowe Merge pull request #530 from rspec/multi-build
Update test-all script so it builds against core and expectations.
bc05246
Myron Marston Updated travis build scripts (from rspec-dev) 9ad40d1
Xavier Shay Better error message when calling private method on a verifying double.
Fixes #531.
6464e4c
Jan 25, 2014
Jon Rowe Merge pull request #537 from rspec/issue-531
Better error message when calling private method on a verifying double.
4893886
Myron Marston Merge pull request #536 from rspec/update-travis-build-scripts-2014-0…
…1-24

Updates from rspec-dev (2014-01-24)
8ec4f5b
Myron Marston Updated travis build scripts (from rspec-dev) 77e9bc5
Xavier Shay Justify uses of known techniques that bust the method cache.
I don't see a way to remove any of these.

Addresses #268.
d309175
Xavier Shay Correct stub undefined parent modules all the way down when stubbing …
…a nested

constant.

This is necessary for verifying doubles to work correctly, since they
need to distinguish between real and stubbed constants.

Fixes #529.
1827ee4
Jan 26, 2014
Xavier Shay Merge pull request #541 from rspec/issue-529
Correct stub undefined parent modules all the way down when stubbing a nested constant.
fd6af3c
Myron Marston Merge pull request #540 from rspec/update-travis-build-scripts-2014-0…
…1-25

Updates from rspec-dev (2014-01-25)
19b9df5
Myron Marston Merge pull request #542 from rspec/issue-268
Justify uses of known techniques that bust the method cache.
e64e6a1
Myron Marston Merge pull request #546 from rspec/cleanup
Cleanup stray whitespace
7a82328
Jan 27, 2014
Jon Rowe cleanup stray whitespace 0c06dce
Xavier Shay Support keyword arguments when checking for valid arity.
This changes the error message that was included in the ArgumentError
raised when arity was incorrect. It used to match the default Ruby
message, it now uses our enhanced error message. While it would be
technically more correct to emulate the Ruby one, ours is more useful and the
logic required would now have to be more complicated to support keyword
arguments.

Fixes #431.
eb1a63a
Xavier Shay Extract RubyFeatures module. 72a8e7c
Xavier Shay Remove unused local. 87d2f2f
Xavier Shay More specific argument matcher. abf08e8
Xavier Shay Rename ArityCalculator to MethodSignature. 8ebdb64
Xavier Shay Remove TODO (already done). 96005cb
Xavier Shay Drop coverage threshold to 96%.
The drop is due to the addition of more implementation-specific code
that has created more lines that are unable to be tested on a single
Ruby.
42230d9
Xavier Shay Support checking for allowed keyword arguments. 79c9ce2
Xavier Shay 1.8 compat 2e20367
Jan 28, 2014
Xavier Shay Refactor MethodSignature to MethodSignatureVerifier. 013b1c0
Myron Marston Merge pull request #543 from rspec/issue-431
Support keyword arguments when checking for valid arity.
f5364ac
Myron Marston Standardize on kw_args over keyword_args.
It's a bit shorter but still obvious what it means.
ad6a7e6
Myron Marston Refactoring: extract MethodSignature class.
- The signature of a method is a concept in its own
  right and deserves to be represented as its own object.
- This gives a clear delineaziation of responsibilities
  between extracting method signature info and verifying
  arguments against that info.
- The new `classify_parameters` approach should perform
  a bit better than what we had before; it iterates over
  `method.parameters` once total where as before it would
  iterate over it 3 times.
83f2e31
Myron Marston Add missing test.
A last-arg hash should only be treated as kw args if the method has kw arg params.
ecca155
Jan 29, 2014
Myron Marston Clean up `split_args` a bit.
- It was odd to have it memoize internally but accept an arg.
- Simpler just to call it once in `initialize`.
4a8a003
Myron Marston Decrease syntactic noise of argument lists.
I find this:

foo(nil, :a => 1)

...to be much less noisy than this:

foo([nil, { :a => 1 }])

The first form more closely matches how people pass args
and kw args to methods, anyway.
3769d40
Myron Marston Refactor: prep for supporting `**kw_args`.
To support `**kw_args`, `allowed_kw_args` will have
to act like an infinite set. Rather than making the
verifier (and any future clients) responsible for
dealing with this special case, it's simpler to move
the invalid/missing kw arg calculations into
`MethodSignature`, where it can handle that special
case internally.
5384099
Myron Marston Add support for `**kw_args` parameters. 7e997eb
Myron Marston We can't count on `is_a?` working on every argument.
BasicObject, for example, does not respond to it.
It's safer to use `SomeClass === obj` than `obj.is_a?(SomeClass)`.
86b2a68
Myron Marston Don't mutate the provided args array.
Mutating could lead to surprises for the caller.
8e1ac5f
Myron Marston Replace multiple conditionals with a single case statement. c313778
Myron Marston `error` => `error_message`
It's not a ruby error object, it's just the message,
so the new name is more accurate.
0ccef42
Myron Marston Update method names, etc to reflect our check is more than arity.
Arity is just the number of arguments but we check
more than that now, so it's good to reflect that.
ae521db
Myron Marston Rename method.
It's a description of the arity so let's call it that.
55a76e0
Myron Marston Refactor: make caller pass a signature object.
This clears the way to use a slightly different
signature implementation (e.g. for blocks).
fd3869c
Myron Marston Reword docstrings.
I'm about to introduce a new `description` method
and having docstrings say "it is described precisely"
when not referring to the description is confusing.
2f33286
Myron Marston Use method signature verifier for `and_yield` block verification. e1aaad5
Jan 30, 2014
Maurício Linhares RSpec::Mocks::NamedObjectReference doesn't have a name method, creati…
…ng specific spec for this case so there are no false positives
0816926
Jon Rowe Merge pull request #550 from mauricio/better-error-on-verifying-double
RSpec::Mocks::NamedObjectReference doesn't have a name method, creating specific spec for this case so there are no false positives
442142e
Myron Marston Merge pull request #548 from rspec/improve-method-signature
Improve method signature / argument validation
dceb9e6
Jan 31, 2014
Jon Rowe changelog for #550
[skip ci]
745d2a6
Myron Marston Add regression spec for #549.
This is already fixed in 3.0 but it's good to add
a spec to prevent future regressions.
e8d6911
Feb 01, 2014
Jon Rowe Merge pull request #553 from rspec/add-spec-for-issue-549
Add regression spec for #549.
a8e8aeb
Myron Marston Update changelog with 2.14.5 release notes.
[ci skip]
7b9930b
Feb 07, 2014
Yuji Nakayama Remove support for `and_return { value }` 492c3ec
Yuji Nakayama Disallow `and_return` without arguments e1c9a3e
Feb 08, 2014
Jon Rowe Merge pull request #561 from yujinakayama/remove-and_return-without-args
Remove support for `and_return { value }`
0672741
Jon Rowe Updated travis build scripts (from rspec-dev) 3ed7151
Jon Rowe Merge pull request #562 from rspec/update-travis-build-scripts-2014-0…
…2-08-for-master

Updates from rspec-dev (2014-02-08)
ed09490
Feb 10, 2014
Myron Marston Updated travis build scripts (from rspec-dev) 4b1a4b6
Myron Marston Merge pull request #568 from rspec/update-travis-build-scripts-2014-0…
…2-10-for-master

Updates from rspec-dev (2014-02-10)
dc27a8b
Myron Marston Use skip instead of pending.
The semantics of pending have changed in rspec-core.
39acf19
Feb 12, 2014
Jon Rowe Updated travis build scripts (from rspec-dev) c199f49
Jon Rowe Merge pull request #573 from rspec/update-travis-build-scripts-2014-0…
…2-12-for-master

Updates from rspec-dev (2014-02-12)
92eb7be
Maurício Linhares Removes #to_str implememtation from test_double
Having test_double implement to_str makes the Ruby
runtime coerce it to a string whenever needed and
this isn't the intended behavior for this object.
This behavior led to issue #567 as Ruby will try
to coerce the exception object into string when raising
(here https://github.com/ruby/ruby/blob/191b373d26a48058bcc8955bf3afe426f60eaaea/eval.c#L678 )
an exception and since test_double does implement to_str
it succeded and raises that instead of failing with the
correct 'this is not an exception object' error.

This fixes #567 by providing a better error message
in it's case.
80c740e
Feb 16, 2014
Maurício Linhares Ignoring `raise double()` specs for ruby 1.9.2
This ignores specs that check for the removal of
`to_str` from Ruby 1.9.2 as they won't work there
due to the Ruby runtime calling `to_str` on a double
without checking if the double implements `to_str`.
6c21ac6
Feb 17, 2014
Myron Marston Move enhancements above bug fixes in changelog.
[ci skip]
55c00d4
Xavier Shay Grammar in Changelog.
[ci-skip]
1c6c770
Myron Marston Merge pull request #577 from mauricio/issue-567
Removes #to_str implementation from test_double
44ef2ff
Myron Marston Add changelog entry for #577.
[ci skip]
afe60cc
Myron Marston Add release notes from 2.99.0.beta2.
[ci skip]
10cdaa3
Myron Marston Update changelog for 3.0.0.beta2 release. [ci skip] d40221e
Myron Marston Release 3.0.0.beta2 e5c2ba0
Myron Marston Prepare changelog for 3.0.0.rc1 development. 9343ade
Feb 18, 2014
Sam Phippen Fix any instance mark_invoked blocks not being cleared properly.
This issue was caused by the order that mocks were torn down in
space.rb. This happened because (in order):

1. Each mock proxy is verified
2. Each any_instance recorder is verified

any_instance verification also currently holds the code for tearing down
any_instance recorders also.

If any mock proxy through an exception whilst it was being verified then
none of the any_instance recorders were verified (which makes sense as
verification of mocks has already failed).

This patch adds a teardown of the any_instance_recorders in reset_all to
RSpec::Mocks::Space
577c7c0
Sam Phippen Fixup any_instance specs to call space#reset_all af67c29
Sam Phippen Add a changelog entry for #580 68803e1
Sam Phippen Cleanup any-instance specs e319be7
Sam Phippen Merge pull request #580 from rspec/any-instance-lifecycle-management
Fix any instance mark_invoked blocks not being cleared properly.
0d1ff8d
Feb 19, 2014
Myron Marston "full changelog" => "Full Changelog" 47d6473
Myron Marston Remove obselete `Upgrade.md` file. 8c129d7
Feb 20, 2014
Myron Marston Add 2.14.6 release notes.
[ci skip]
71f633c
Justin Coyne Log a warning when methods are reset on a frozen object d81118d
Sam Phippen Fixup specs for frozen mock object resets 3acfdb5
Sam Phippen Conditional on frozen over exceptions 9ae1dba
Stephen Best Make frozen warnings work 0ea047b
Feb 21, 2014
Sam Phippen Merge pull request #527 from rspec/frozen_support
Frozen support
d57d186
Jonathan del Strother Clean up remaining expectations when verifying fails 888f297
Jonathan del Strother Verify the last argument is called in receive_message_chain
Prior to this, something like -

  expect(object).to receive_message_chain(:foo, :bar => 1)
  object.foo

would pass, despite 'bar' not being called.
b1a151a
Myron Marston Rename file. ea7bf4a
Myron Marston Null object `to_str` should return a string. 8d2e4e5
Feb 22, 2014
Jon Rowe Merge pull request #523 from jdelStrother/message_chain
Verify the last argument is called in receive_message_chain
832711a
Myron Marston Merge pull request #588 from rspec/fix-null-object-to-str
Fix null object to str
1bf4412
Myron Marston Add changelog entry for #523.
[ci skip]
1183cbf
Myron Marston Improve docs of ExampleMethods module. 1cbfe4b
Myron Marston Reorganize requires.
No need for a framework file that does all the requires.
5fe844e
Myron Marston Use autoload to delay loading features until we need them.
This yields about a 10% improvement in the time it
takes to initially load rspec-mocks.
47d398b
Myron Marston Merge pull request #596 from rspec/reorganize-requires
Reorganize requires
782f7c5
Myron Marston Merge pull request #595 from rspec/improve-example-methods-docs
Improve docs of ExampleMethods module.
6ca466e
Myron Marston Use dedented style for `private`. 004af10
Myron Marston Remove duplicate constant that we don't need. d062850
Myron Marston Remove excess comment. d934398
Myron Marston Remove `TestDouble.extend_onto`.
This was added in #117 to support using a module
as a pure test double by extending `TestDouble`
onto the module. Since then, I've realized we can
get the same behavior by subclassing module:

class MyModuleTestDouble < Module
  include TestDouble
end

...and that's what we do for class verifying doubles now.

Given that, there's no need to keep this API around anymore.
bc573f4
Myron Marston Merge pull request #598 from rspec/remove-test-double-extend-onto
Remove `TestDouble.extend_onto`.
44573b0
Myron Marston Prefer dedented `private`. 0bce361
Feb 23, 2014
Myron Marston Switch to `--require spec_helper` option. 55a2171
Myron Marston Merge pull request #601 from rspec/fix-spec-helper-require
Switch to `--require spec_helper` option.
3783977
Feb 24, 2014
Myron Marston Leverage new optimized require from rspec-support. 1fb1ff3
Feb 25, 2014
Jon Rowe remove test files from gemspec to speed up dl/s 8c513d2
Jon Rowe Merge pull request #604 from rspec/smaller-built-gem-size
Don't include any test files in the gem.
7615de1
Jon Rowe Updated travis build scripts (from rspec-dev) 6618d3c
Jon Rowe Merge pull request #606 from rspec/update-travis-build-scripts-2014-0…
…2-25-for-master

Updates from rspec-dev (2014-02-25)
e43d033
Myron Marston Merge pull request #607 from rspec/use-relative-require
Leverage new optimized require from rspec-support.
7a3e9aa
Myron Marston Fix typo.
[ci skip]
a3fe427
Feb 27, 2014
Jon Rowe remove constant stubber const 2634348
Jon Rowe Merge pull request #608 from rspec/remove_constant_stubber_const
Remove ConstantStubber constant
3eaf6bc
Jon Rowe 2.99 rc1 changelog
[skip ci]
70afdc2
Jon Rowe fix typo
[skip ci]
2de265c
Jon Rowe changelog entry for removal of ConstantStubber
[skip ci]
be3b0a4
Jon Rowe Merge pull request #610 from rspec/remove_constant_stubber_const
Changelogs
4b0c527
Jon Rowe Revert "2.99 rc1 changelog"
[skip ci]

This reverts commit 70afdc2.
c53dd99
Jon Rowe Merge pull request #611 from rspec/changelogs
Revert "2.99 rc1 changelog"
4a9aa4a
Myron Marston Migrate `should` syntax specific specs to their own file. f5d9fe9
Myron Marston Convert specs to RSpec 3.0.0.beta2 syntax with Transpec
This conversion is done by Transpec 1.9.3 with the following command:
    transpec -c "bundle install && bundle exec rspec"

* 295 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 128 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 65 conversions
    from: Klass.any_instance.should_receive(:message)
      to: expect_any_instance_of(Klass).to receive(:message)

* 50 conversions
    from: Klass.any_instance.stub(:message)
      to: allow_any_instance_of(Klass).to receive(:message)

* 28 conversions
    from: obj.stub_chain(:message1, :message2)
      to: allow(obj).to receive_message_chain(:message1, :message2)

* 24 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 7 conversions
    from: Klass.any_instance.should_not_receive(:message)
      to: expect_any_instance_of(Klass).not_to receive(:message)

* 7 conversions
    from: obj.stub(:message => value)
      to: allow(obj).to receive_messages(:message => value)

* 3 conversions
    from: Klass.any_instance.stub_chain(:message1, :message2)
      to: allow_any_instance_of(Klass).to receive_message_chain(:message1, :message2)

* 2 conversions
    from: Klass.any_instance.stub(:message => value)
      to: allow_any_instance_of(Klass).to receive_messages(:message => value)

* 1 conversion
    from: obj.stub(:message).and_return
      to: obj.stub(:message)
4117431
Myron Marston Fix any_instance specs after transpec has updated them.
- Some specs only apply to the old :should syntax.
- Some specs were testing invalid things that transpec
  removed.
e4800a3
Myron Marston Fix a use of `stub` that was missed by transpec. 6cb45ce
Myron Marston Migrate some more specs that are `should`-specific. 1fbfdd8
Myron Marston Disable :should syntax by default.
Fixes #600.
cb2e368
Myron Marston Remove old comment. 3deb657
Myron Marston Update doc strings so they don't mention legacy APIs. 61ad84d
Myron Marston Add some basic sanity check specs for `should` syntax.
Since we've migrated to the expect syntax we lost a lot
of test coverage for the should syntax.  For the most part
we don't need everything covered for both because it's the
same underlying mechanisms but some sanity tests are nice.
126e6f1
Myron Marston Remove extra blank line.
[ci skip]
8d883e0
Myron Marston Merge pull request #612 from rspec/migrate-spec-syntax
Migrate spec syntax
ad30d03
Mar 01, 2014
Xavier Shay Remove newline from unimplemented error message.
In rspec-fire it was possible for this error to contain multiple method
names, so newlines made sense. Given how it is now implemented, this
cannot happen.
0cf08e0
Xavier Shay Include private methods when checking for implementation in verifying…
… partial doubles.

Fixes #603.
2891fbb
Xavier Shay Merge pull request #615 from rspec/issue-603
Allow verifying partial doubles to expect private methods.
f394163
Xavier Shay Add most missing documentation. 160da90
Xavier Shay Replace many instances of @api private with @private so yard ignores …
…it properly.
22850ac
Mar 02, 2014
Xavier Shay Remove invalid @public tag. 2992a22
Xavier Shay Fix up some warnings. 79cba2e
Myron Marston Do not reset proxies during verify.
Resetting should not happen until the reset phase.

Fixes #590.
e30539a
Myron Marston Address warning:
spec/rspec/mocks/any_instance_spec.rb:1053: warning: assigned but unused variable - e
0548de8
Myron Marston Merge pull request #617 from rspec/argument_matcher_descriptions
Add missing argument matcher descriptions, specs for descriptions
f0e815c
Myron Marston Merge pull request #592 from rspec/fix-issue-590
Don't double reset
40cdcce
Jon Rowe Fix stubbing so it works with a prepended module. e4c76e9
Myron Marston The prepend logic isn't just for classes.
It's for any object with a prepended module in its
singleton class's ancestor chain.
1a3e94c
Myron Marston Improve prepended module detection.
- Add spec showing that we don't mutate the ancestor
  chain in cases where there is no prepended module
  overriding the method.
- Handle objects with multiple prepended modules.
- Extract prepended_modules method on proxy. It
  is memoized, which can improve perf a bit if
  multiple methods get stubbed.
- Rename method.
cf3a1e1
Myron Marston Ensure we always get a viable prepended module.
- If the user prepends another module between examples,
  our module may no longer take precedence.
- Fix the pollution spec -- it wasn't actually failing properly.
6e04f41
Myron Marston Extract prepend detection into RubyFeatures. dbf4afb
Jon Rowe remove the defined order restriction 07f8702
Myron Marston Deal with bug in ruby 2.0.0p247.
If we don't rescue this error, then it can leave
partial doubles in a permanently inconsistent
state for the rest of the process.

The best we can do is just rescue and issue a warning.
81cbce9
Myron Marston Remove need for `rescue NameError` on ruby 2.0.0.
This was needed because of a bug in our prepended
module detection. The logic was originally written
against ruby 2.1, where `object.singleton_class.ancestors`
always includes the singleton class. On ruby 2.0,
it only includes the singleton class if there is a
prepended module. If there is not a prepended module,
it's not in the ancestors array and our `take_while`
logic considered EVERY ancestor to be a prepended
module even though there were none.

Instead, we can find the prepended module by taking
all ancestors until the first class.
961cbf6
Myron Marston Merge pull request #586 from rspec/bugfix_for_prepend
Demonstrate issue with stubbing out a class that's been prepended.
df1597e
Mar 03, 2014
Jon Rowe Add missing descriptions to argument_matchers and modernise their specs ee14302
Jon Rowe changelog for #617
[skip ci]
e65aede
Mar 04, 2014
Sam Phippen Add docs to anyinstance classes and config 4c6a1ac
Sam Phippen Mark RSpec::Mocks::AnyInstance as @private 085d1ce
Mar 05, 2014
Xavier Shay Merge pull request #616 from rspec/issue-585
100% doc coverage
dbd5533
Myron Marston Improve docs a bit.
[ci skip]
5bdc55b
Mar 06, 2014
Myron Marston Address YARD warnings.
See lsegal/yard#746 for discussion.
3233564
Myron Marston Make `space` private. 96e81db
Myron Marston Improve docs for monkey patched methods.
They were listed as being methods on `RSpec::Mocks`.
By defining the docs within `BasicObject`
and `Class` they are rendered properly.
2719e9c
Myron Marston Merge pull request #622 from rspec/address-yard-warnings
Address YARD warnings.
1ba2ca0
Mar 08, 2014
Xavier Shay Make Marshal monkey-patch opt-in. 8a9bba3
Xavier Shay Merge pull request #620 from rspec/issue-614
Make Marshal monkey-patch opt-in.
9e91530
Mar 14, 2014
Jon Rowe Updated travis build scripts (from rspec-dev) 692afc2
Myron Marston Merge pull request #624 from rspec/update-travis-build-scripts-2014-0…
…3-14-for-master

Updates from rspec-dev (2014-03-14)
58d7c30
Oren Dobzinski Fix a copy past error 3ce195f
Myron Marston Merge pull request #625 from orend/patch-1
Fix a copy past error
36b5104
Mar 15, 2014
Jon Rowe Fix moar typos 3e50671
Maurício Linhares Fixing issue with Ruby 1.8.7 not setting the &block parameter when ca…
…lling super

Sending both *args and &block directly make the code do what it was expected
to do, this fixes #623.
46c5c73
Mar 16, 2014
Jon Rowe Merge pull request #626 from mauricio/issue-623
Fixing issue with Ruby 1.8.7 not setting the &block parameter when calling super
36c09f4
Jon Rowe changelog and comments for #626
[skip ci]
a3223c9
Aaron Kromer Ruby 2.1 has deprecated File.exists ff666b3
Maurício Linhares Including one more spec for verifying proxy to make sure allow/receiv…
…e expectations work

This is a complement to #623, this validates that:

    allow(object).to receive(:implemented) { :value }

Correctly evaluates the block given as the implementation.
084ecb2
Myron Marston Merge pull request #628 from mauricio/spec-for-allow-receive-on-verif…
…ying-proxy

Including one more spec for verifying proxy to make sure allow/receive expectations work
c0694b6
Mar 17, 2014
Jon Rowe Merge pull request #627 from cupakromer/file-exists-deprecated
Ruby 2.1 has deprecated File.exists
64578f7
Mar 18, 2014
Jon Rowe switch to rspec-support MethodSignatureVerifier and friends 32e7d40
Jon Rowe Merge pull request #629 from rspec/extract_method_signature_verifier
Switch to extracted method signature verifier
4718858
Jon Rowe primitive fix for inspect accessing unexpected things 754cb3f
Aaron Kromer Document stub behavior on `clone` and `dup`.
For more details on the inner workings on `clone` vs `dup` see:

  http://stackoverflow.com/a/10183477/29262

`dup` does not copy object state. Stubs are viewed as part of object
state, so they are not transfered. However, `clone` should copy an
object's state; thus the stubs should also be copied.
9076251
Mar 19, 2014
Jon Rowe spec demonstrating issue 38098ab
Jon Rowe changelog for #630
[skip ci]
4ed12e7
Jon Rowe Merge pull request #630 from rspec/primitive_fix_for_inspect_loops
Primitive fix for inspect accessing mocked methods (etc) in any_instance.
badcc0b
Jon Rowe Merge pull request #631 from cupakromer/dup-clone-stubs
Document stub behavior on `clone` and `dup`.
5bf1d9d
René Föhring Add docs badge to README 3c2f5e5
Bradley Schaefer Merge pull request #632 from rrrene/patch-1
Add docs badge to README
12510a9
Mar 22, 2014
Myron Marston Standardize on `shared_examples`.
`shared_examples_for` is being removed.
eaaad7c
Myron Marston Address ruby warnings. 5f881b9
Myron Marston Use modern scope names for hooks. 1851678
Mar 23, 2014
Xavier Shay Make RSpec::Mocks::Space more thread-safe.
It used to be possible for different threads to receive different proxy
objects, potentially a source of bugs such as #380.

This is non-trivial to write a spec for, but you can trivially
demonstrate the problem by adding a `sleep` into the fetch blocks, and
then running:

    o = Object.new
    t = Thread.new do
      RSpec::Mocks.space.proxy_for(o)
    end
    b = RSpec::Mocks.space.proxy_for(o)
    a = t.value

    expect(a).to eq(b)
9674568
Thomas Holmes Add section to README for any instance features. d680c26
Xavier Shay Merge pull request #635 from rspec/pull-579-2
Add section to README for any instance features.
e1ad64d
Myron Marston Remove unused attribute. b3f778f
Myron Marston Address ruby warning.
/Users/myron/code/rspec-dev/repos/rspec-mocks/lib/rspec/mocks/space.rb:107: warning: private attribute?
4b6f65e
Myron Marston Make FakeMutex a singleton object.
It's stateless so there's no need to create
new instances; it's just a waste of memory.
9613f2f
Mar 24, 2014
Jon Rowe Merge pull request #634 from rspec/issue-380
Make RSpec::Mocks::Space more thread-safe.
82c4ddf
Sam Phippen Merge pull request #637 from rspec/threadsafety-followup
Threadsafety followup
eed2e01
Mar 26, 2014
Oren Dobzinski [Fixes #640] Support verifying private methods for any_instance 65a88f1
Myron Marston Merge pull request #641 from orend/support_any_instance_private_methods
Support verifying private methods for any_instance
fc03c43
Myron Marston Add changelog entry for #641.
[ci skip]
8eb3f9e
Oren Dobzinski fix a small typo in changelog 6cef313
Myron Marston Merge pull request #642 from orend/patch-2
fix a small typo in changelog
31b7bea
Mar 28, 2014
Jon Rowe remove color_enabled in favour of color eb9df7c
Myron Marston Merge pull request #638 from rspec/fix_docs
Match mocks to expectations/core and not exclude yard from Travis
ae52236
Mar 29, 2014
Jon Rowe match mocks to expectations/core and not exclude yard 9e89d7b
Jon Rowe `@api private` had no effect here so lets make them `@private` 420df1c
Jon Rowe Merge pull request #643 from rspec/color_enabled
Remove color_enabled in favour of color
7bdbb52
Xavier Shay Provide a failure message when trying to observe an unimplemented met…
…hod on any instance.
74ff41f
Xavier Shay Merge pull request #644 from rspec/issue-639
Provide a failure message when trying to observe an unimplemented method...
ccbcbd5
Myron Marston Updated travis build scripts (from rspec-dev) 904afee
Myron Marston Merge pull request #645 from rspec/update-travis-build-scripts-2014-0…
…3-29-for-master

Updates from rspec-dev (2014-03-29)
867e88b
Mar 30, 2014
Myron Marston Updated travis build scripts (from rspec-dev) be01143
Myron Marston Merge pull request #648 from rspec/update-travis-build-scripts-2014-0…
…3-30-for-master

Updates from rspec-dev (2014-03-30)
1c5ec1a
Apr 01, 2014
Myron Marston Get `and_call_original` to work properly on class hierarchies.
For #613.
f0880f3
Myron Marston Merge pull request #649 from rspec/fix-613
Get `and_call_original` to work properly on class hierarchies.
dcd7b57
Myron Marston Changelog for #649.
[ci skip]
9ec1132
Apr 02, 2014
Myron Marston Refactor: centralize location/expected_from. 66055a6
Myron Marston Add failing spec. 37447c3
Myron Marston Make `any_instance` update existing instance stubs.
Fixes #613.
e00d6d7
Myron Marston Implement `respond_to?` properly. 62ad321
Apr 03, 2014
Myron Marston Implement `respond_to?` on the example proxy.
This makes the object a better behaved object
that accurately reports what it responds to.

It's also necessary for rspec/rspec-expectations#513
de63b7d
Apr 06, 2014
Myron Marston Merge pull request #651 from rspec/fix-any-instance-partial-doubles
Fix `any_instance` so that it updates already stubbed instances
d2be103