Sha256: dcd94fe755700ce1b1829b3ab2e22a4ac5b7c9c9acb173609ae612cc70c51dad
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
require 'test_helper' require 'models/user' class ValidateAcceptanceTest < Minitest::Test 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-1.1.0 | test/cases/validate_acceptance_matcher_test.rb |