Sha256: fae7d474770e18aacac98653cceb7c0cb1123a9a47092c2861a7be7501beca9f
Contents?: true
Size: 675 Bytes
Versions: 1
Compression:
Stored size: 675 Bytes
Contents
require 'test_helper' require 'models/user' 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-1.0.0 | test/cases/validate_acceptance_matcher_test.rb |