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

Version Path
lgustafson-validatable-1.8.7 test/unit/test_validates_exclusion_of.rb
lgustafson-validatable-1.8.6 test/unit/test_validates_exclusion_of.rb
np422-validatable-1.8.5 test/unit/test_validates_exclusion_of.rb
erotte-validatable-1.8.5 test/unit/test_validates_exclusion_of.rb
mattmatt-validatable-1.8.4 test/unit/test_validates_exclusion_of.rb
mattmatt-validatable-1.8.3 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.8.4 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.8.3 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.8.2 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.1.10 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.1.9 test/unit/test_validates_exclusion_of.rb
jnunemaker-validatable-1.8.1 test/unit/test_validates_exclusion_of.rb