Sha256: f299db58b4327c22b8818ff01521a79f33d9ac18548834ead00f4fbb6a7d2356

Contents?: true

Size: 700 Bytes

Versions: 18

Compression:

Stored size: 700 Bytes

Contents

module ActiveModel
  module Lint
    module Tests
      module Validations

        VALIDATION_METHODS = %w[
          validate
          validates
          validates_each
          validates_with
          validates_acceptance_of
          validates_confirmation_of
          validates_exclusion_of
          validates_format_of
          validates_inclusion_of
          validates_length_of
          validates_numericality_of
          validates_presence_of
        ]

        VALIDATION_METHODS.each do |validation_method|
          define_method "test_#{validation_method}" do
            assert model.class.respond_to?(validation_method)
          end
        end

      end
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
ardm-active_model-1.3.0 spec/lib/amo_lint_extensions.rb
ardm-active_model-1.2.0 spec/lib/amo_lint_extensions.rb
tpitale-dm-active_model-1.3.0 spec/lib/amo_lint_extensions.rb
dm-active_model-1.2.1 spec/lib/amo_lint_extensions.rb
dm-active_model-1.2.0 spec/lib/amo_lint_extensions.rb
dm-active_model-1.2.0.rc2 spec/lib/amo_lint_extensions.rb
dm-active_model-1.2.0.rc1 spec/lib/amo_lint_extensions.rb
dm-active_model-1.1.0 spec/lib/amo_lint_extensions.rb
dm-active_model-1.1.0.rc3 spec/lib/amo_lint_extensions.rb
dm-active_model-1.1.0.rc2 spec/lib/amo_lint_extensions.rb
dm-active_model-1.1.0.rc1 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.3 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.2 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.1 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.0 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.0.rc3 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.0.rc2 spec/lib/amo_lint_extensions.rb
dm-active_model-1.0.0.rc1 spec/lib/amo_lint_extensions.rb