Skip to content

Verifying partial doubles doesn't work with private methods

gitlab-qa-bot requested to merge allow_verification_private_methods into master

Created by: JonRowe

I'm just upgrading to RSpec 3, and I have set

RSpec.configure do |config|
  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end
end

And in one of my tests I'm stubbing a private method:

allow(object).to receive(:some_method)

However, I get the error:

#<MyObject:0x007ff7cb8d9170> does not implement:
  some_method

Merge request reports