Sha256: e89461b50360bdaa57589c551be72c7fc469c1d11b1c8b9cd7911ca1cbea0500

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

require 'test_helper'

class ValidateAcceptanceTest < MiniTest::Unit::TestCase
  test 'must validate acceptance of an attribute' do
    assert_must validate_acceptance_of(:eula), User
  end

  test 'must not validate acceptance of an attribute' do
    assert_wont validate_acceptance_of(:not_accepted), User
  end

  test 'must validate acceptance of an attribute with an accepted value' do
    assert_must validate_acceptance_of(:terms_of_service).accept_with(true), User
  end

  test 'must not validate acceptance of an attribute with an unaccepted value' do
    assert_wont validate_acceptance_of(:terms_of_service).accept_with('1'), User
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minitest-activemodel-0.0.1 test/cases/validate_acceptance_matcher_test.rb