rspec-mocks icon indicating copy to clipboard operation
rspec-mocks copied to clipboard

RSpec's 'test double' framework, with support for stubbing and mocking

Results 71 rspec-mocks issues
Sort by recently updated
recently updated
newest added

Hi there! I'm using rspec-mocks (3.7.0) with minitest (5.10.3) and whenever I try to use `instance_double` on a Rails model, I have some missing methods, that should exist given the...

The following is an example of some confusing output that could be cleared up. ``` describe "multi message expectation could be nicer" do let(:subject) { Object.new } it "should show...

Hello! I found strange issue with `stub_const` helper: Given `lib/conveyor.rb` ```ruby module Conveyor class NotFound < ArgumentError; end def self.find_module(key) raise NotFound.new(key) end def self.registered_modules [] end def self.register(klass) return...

In a situation when a method comes from an included module and then this same method is refined, invoking `expect().to receive` fails as if the method is not present at...

When you have multiple stubs on a method with different arguments there is a check performed to see which stub should be called based on the argument. If the argument...

I have a test setup that runs using the database cleaner style of RSpec tests, keeping tests atomic. The problem with this is that some of my models use the...

I don't know if this is a bug *per se*, or just unavoidable from the way I am writing this test. Basically I am trying to solve a problem that...

It seems from other issues posted that this was an intentional breaking change in 3.0.0, but from the issues listed I haven't been able to put together a concrete answer...

### The problem Given the following example: `expect(my_object).to receive(:foo)` As of today, this implicitly tells rspec-mocks to stub the `foo` method. But that's not what the Ruby code says! The...