Sha256: 89fe396e779c68a0894594b849d37974a57fb8cea8717ea44a29bb94e3c96076
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
def errors_for(validator,annotations) c = validator.new([],{}) stub(c).annotations{ annotations } c.run end RSpec::Matchers.define :return_no_errors_for do |annotations| match do @actual = errors_for(actual,annotations) @expected = [] actual == expected end diffable end RSpec::Matchers.define :return_errors_for do |annotations,errors| match do @actual = errors_for(actual,annotations).sort @expected = errors.sort actual == expected end diffable end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
genomer-plugin-validate-0.0.2 | spec/validator_run_matcher.rb |