Files
nairobi/spec/support/matchers/have_avatar.rb
taitus 9081174dd7 Add and apply Style/KeywordArgumentsMerging rubocop rule
This rule was introduced in RuboCop 1.68 to encourage passing
additional keyword arguments directly instead of using merge.
2025-03-05 11:42:47 +01:00

10 lines
265 B
Ruby

RSpec::Matchers.define :have_avatar do |text, **options|
match do |page|
page.has_css?("svg.initialjs-avatar", **{ exact_text: text }, **options)
end
failure_message do
"expected to find avatar with text #{text} but there were no matches."
end
end