Stash and restore aliased methods when the owner is reported wrong.
Fixes #206. While I was at it, I wanted to verify that `and_call_original` works with this case, so I added a spec for it, too.
- No need for `find_path_to_rspec_exe`; I've discovered that `--standalone` and `--binstubs` together produce bins that don't load bundler. - Add `-x` to `set -e` as that will cause the script to print each command as it runs. No need for `print_and_run`. - Add cucumber to test_all script, and use just that for the build.
Use Kernel#inspect instead of #to_s
Kernel#inspect does not call #to_s anymore, on Ruby2.0.0
It didn't work properly with names containing leading '::' before. Fixes #200.
There contents of the heredoc starts on the next line, hence the need for `+ 1`.
fix receive spelling error
Prior to this commit several of the examples in the message expectation documentation had the method as `should_recieve` when the proper spelling is `should_receive`. This commit fixes those documentation errors.
Add method to call_original method from a stub
1.8 does not allow you to bind a singleton method from a class's superclass to the class, so our original code failed. This tries to work around the issue while alerting the user to the fact that it may not work correctly in all cases.
I forgot to remove this code as part of that commit.
The old name implied it always stashed a method (and made `stashed_method.method_is_stashed?` read funny). The new name makes it clear what role the object plays without implying that it always stashes the method.
Based on conversations with @dchelimsky and others, we've decided it's best not to raise an early error from `and_call_original` as that creates an inconsistency since we sometimes don't know if `method_missing` will handle the message or not.
Add support to temporarily remove constants
* A constant is mutated if it has been either stubbed or hidden