Commit 180f2825 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'nicolasdular/snowplow-spec-helper-ruby-2-7' into 'master'

Remove snowplow spec helper fix

See merge request gitlab-org/gitlab!46228
parents 8bed2e9c b0b56da0
...@@ -32,16 +32,8 @@ module SnowplowHelpers ...@@ -32,16 +32,8 @@ module SnowplowHelpers
# end # end
# end # end
def expect_snowplow_event(category:, action:, **kwargs) def expect_snowplow_event(category:, action:, **kwargs)
# This check will no longer be needed with Ruby 2.7 which
# would not pass any arguments when using **kwargs.
# https://gitlab.com/gitlab-org/gitlab/-/issues/263430
if kwargs.present?
expect(Gitlab::Tracking).to have_received(:event) # rubocop:disable RSpec/ExpectGitlabTracking expect(Gitlab::Tracking).to have_received(:event) # rubocop:disable RSpec/ExpectGitlabTracking
.with(category, action, **kwargs).at_least(:once) .with(category, action, **kwargs).at_least(:once)
else
expect(Gitlab::Tracking).to have_received(:event) # rubocop:disable RSpec/ExpectGitlabTracking
.with(category, action).at_least(:once)
end
end end
# Asserts that no call to `Gitlab::Tracking#event` was made. # Asserts that no call to `Gitlab::Tracking#event` was made.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment