Sha256: f798f95e0f55f7c4bb7809df0f32c00eef6a777bfc2c125fd0d8b8578a73a2eb

Contents?: true

Size: 344 Bytes

Versions: 1

Compression:

Stored size: 344 Bytes

Contents

require 'test_helper'
require 'models/user'

class ValidatePresenceMatcherTest < Minitest::Test
  test 'must validate presence of a required attribute' do
    assert_must validate_presence_of(:name), User
  end

  test 'must not validate presence of an optional attribute' do
    assert_wont validate_presence_of(:not_required), User
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minitest-activemodel-1.1.0 test/cases/validate_presence_matcher_test.rb