rubyspec/mspec — pull request #47 by iainbeeston (2013-08-10 20:57:07+00:00)
Title: Revert pull request to fix RSpec deprecation warnings

Since I made this PR I've come to think this was a bad idea. MSpec defines it's own methods that have the same name as built in rspec methods, such as stub!() and mock(). Before the commit below, some of the tests were raising rspec deprecation warnings *while calling MSpec-specific methods*. They shouldn't have been raising deprecation warnings at all if they were correctly calling the MSpec methods. This makes me think that RSpec was overwriting the MSpec methods on Mock and Object, and the MSpec methods were not being called at all, but because the functionality is almost identical, it wasn't obvious that this was happening until they started showing deprecation warnings.

For a good example of this, see mock_spec.rb. Under RSpec < 2.14.2 this runs fine. But on 2.14.2 it shows a number of deprecation warnings, while calling what should have been MSpec-specific methods.

I'd put more thought into fixing this problem, but if RSpec is going to be replaced in MSpec 2 it doesn't seem worth the effort to make such a painstaking change to the test suite. So I suggest reverting that change and leaving things as they were.