Skip to content

Instantly share code, notes, and snippets.

@Chocksy
Created July 13, 2016 17:51
Show Gist options
  • Save Chocksy/61ca1c3ad58c3b0f59d86c166e49d75c to your computer and use it in GitHub Desktop.
Save Chocksy/61ca1c3ad58c3b0f59d86c166e49d75c to your computer and use it in GitHub Desktop.
Temporary disable verify_partial_doubles
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
# 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