Sha256: b5ad7e5fc36eec5dda0e02bdf5d8ef91231fe3492dd14b4904d14b6a0e9f180c

Contents?: true

Size: 695 Bytes

Versions: 3

Compression:

Stored size: 695 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

class ValidatesAcceptanceOfTest < Test::Unit::TestCase
  test "valid acceptance" do
    validation = Validatable::ValidatesAcceptanceOf.new :acceptance
    instance = stub(:acceptance=>'true')
    assert_equal true, validation.valid?(instance)
  end
  
  test "invalid acceptance" do
    validation = Validatable::ValidatesAcceptanceOf.new :acceptance
    instance = stub(:acceptance=>'false')
    assert_equal false, validation.valid?(instance)
  end
  
  expect true do
    Validatable::ValidatesAcceptanceOf.new(:test).must_understand(:message => nil, :if => nil, :times => nil, :level => nil, :groups => nil)
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
validatable-1.3.4 test/unit/validates_acceptance_of_test.rb
validatable-1.3.0 test/unit/validates_acceptance_of_test.rb
validatable-1.3.2 test/unit/validates_acceptance_of_test.rb