Sha256: cbdb9cf1cca8622618e18fe2213109b0de07d302d6333a070c5030d899b98c6c
Contents?: true
Size: 362 Bytes
Versions: 1
Compression:
Stored size: 362 Bytes
Contents
shared_examples_for "required model attributes include" do |set_of_attributes| set_of_attributes.each do |attribute| it attribute do sans_attribute = model_options.reject {|k,_| k == attribute} expect do described_class.new(sans_attribute).validate! end.to raise_error(ArgumentError, /#{attribute} is required/) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opennorth-represent-0.1.0 | spec/support/shared_examples/required_model_attributes_include.rb |