clarion/spec/support/matchers/has_errors_on.rb
2024-04-13 22:17:15 +03:00

7 lines
164 B
Ruby

RSpec::Matchers.define :have_error_on do |expected|
match do |actual|
expect(actual).to_not be_valid
expect(actual.errors).to have_key expected
end
end