clarion/spec/support/matchers/has_errors_on.rb
2014-08-07 14:03:28 +03:00

7 lines
168 B
Ruby

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