Created
July 13, 2016 17:51
-
-
Save Chocksy/61ca1c3ad58c3b0f59d86c166e49d75c to your computer and use it in GitHub Desktop.
Temporary disable verify_partial_doubles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it 'tracks and event', verify_partial_doubles: false do | |
expect_any_instance_of(Analytics).to receive(:track) do |_o, options| | |
expect(options).to include(event: 'invited user') | |
expect(options[:properties]).to include(organization: organization.name) | |
end | |
post_with owner, :create_invites, params | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/verify_partial_doubles_helper.rb | |
RSpec.configure do |config| | |
config.before do |example| | |
config.mock_with :rspec do |mocks| | |
mocks.verify_partial_doubles = example.metadata[:verify_partial_doubles] | |
end | |
end | |
config.after do | |
config.mock_with :rspec do |mocks| | |
mocks.verify_partial_doubles = true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment