Sha256: 2231641f512eb52572b7e47ee588881c532619a000fbedcb6d6785c330929638
Contents?: true
Size: 813 Bytes
Versions: 12
Compression:
Stored size: 813 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') Expectations do expect false do validation = Validatable::ValidatesExclusionOf.new stub_everything, :state, :within => %w(in out) validation.valid?(stub(:state => 'in')) end expect true do validation = Validatable::ValidatesExclusionOf.new stub_everything, :state, :within => %w(in out) validation.valid?(stub(:state => 'foo')) end expect true do validation = Validatable::ValidatesExclusionOf.new stub_everything, :state, :within => %w(in out), :allow_blank => true validation.valid?(stub(:state => '')) end expect true do validation = Validatable::ValidatesExclusionOf.new stub_everything, :state, :within => %w(in out), :allow_nil => true validation.valid?(stub(:state => nil)) end end
Version data entries
12 entries across 12 versions & 5 rubygems