Skip to content

Fixing Issue #10 (deprecates pull request #46)

gitlab-qa-bot requested to merge github/fork/c42engineering/any-instance5 into master

Created by: kaiwren

Closes #10 (closed) and deprecates pull request #46 Add support for any_instance:

  • MyClass.any_instance.stub(:m)
  • MyClass.any_instance.should_receive(:m)
  • includes stub and mock APIs including
    • and_return, and_raise, and_yield
    • once, twice, exactly, any_number_of_times, never, at_least, at_most
  • Closed by b48d777b.

Note that based on conversations with @dchelimsky RSpec's any_instance.should_receive behaves slightly differently from mocha's. The current implementation behaves as exactly_one_instance.should_receive as opposed to mocha's at_least_one_instance.should_receive.

Do let me know where I should document this.

Merge request reports