Sha256: 45a181b30e076bf1723b70133f0ab7231a9cc6a8003d39f61cead4558f450f4f
Contents?: true
Size: 602 Bytes
Versions: 2
Compression:
Stored size: 602 Bytes
Contents
require "spec_helper" class TestProduct < TestModel validates :jan_code, jan: true end describe JanValidator do describe "validation" do context "valid codes" do valid_codes.each do |code| it "#{code} should be valid" do actual = TestProduct.new(jan_code: code) expect(actual).to be_valid end end end context "invalid codes" do invalid_codes.each do |code| it "#{code} should be invalid" do actual = TestProduct.new(jan_code: code) expect(actual).to be_invalid end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jan_validator-0.1.0 | spec/jan_validator_spec.rb |
jan_validator-0.0.1 | spec/jan_validator_spec.rb |