mocha icon indicating copy to clipboard operation
mocha copied to clipboard

Mocha is a mocking and stubbing library for Ruby

Results 167 mocha issues
Sort by recently updated
recently updated
newest added

This is an alternative to #81. The comments on that PR include some suggestions of how to implement this. Don't forgot to update the documentation to make this behaviour clear.

feature-request
quality

c.f. #318 Also see #285, #81, #284 & latterly #529. Don't forgot to update the documentation to make this behaviour clear.

feature-request

From [this comment](https://github.com/freerange/mocha/pull/527#discussion_r856341448): > RuboCop v0.58.2 has a false positive for this case. So I had to disable Bundler/DuplicatedGem. The latest RuboCop (v1.27.0) raises no offense. It would be nice...

quality

See: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

feature-request

In [this commit](https://github.com/freerange/mocha/commit/08b9f4cafb9a92f78f89bb19c5625a519c6afe2a) we avoided a breaking change in psych v4 in ruby v3.1 which was shipped with psych v4 which int turn included [a breaking change][1] that was mentioned...

quality

To make it easier to contribute to the project. c.f. https://github.com/rails/rails/pull/43061

quality

It's often not important to see satisfied stubs in test output, and in some test suites the noise can be difficult to parse. This commit introduces an `Expectation#quietly` method which...

In #517, @qr8r noticed that [this documentation][1] was using behaviour deprecated in #290. We should check all the example code in the docs and make sure it doesn't rely on...

documentation

I have a method that yields to a block and I want to stub out that method but still what the block returned without using an explicit return. ``` def...

feature-request

c.f. RSpec's [`contain_exactly`][1]. See https://github.com/freerange/mocha/issues/505#issuecomment-866347475 for the beginnings of an implementation. [1]: https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/contain-exactly-matcher

feature-request