Files
growstuff/spec/custom_matchers.rb
2019-12-26 13:38:17 +13:00

10 lines
209 B
Ruby

# frozen_string_literal: true
require 'rspec/expectations'
RSpec::Matchers.define :have_optional do |expected|
match do |actual|
actual.has_selector? "#{expected} + span", text: '(Optional)'
end
end