Build Status Code Climate

Make your RSpec specs fail when you stub the object under test (subject) because it is bad practice.

In your spec_helper.rb:

require 'rspec_stubout/prevent_stubout'

RSpec.configure do |config|
  RspecStubout.prevent_stubout(config)
end

To turn it off for some examples, allowing them to stub subject:


it 'stubs subject', allow_stubout: true do
  subject.stub(method1: 'foo')
end