Sha256: 437dfe5f55ca2ad3b37191b2945f4cda8b6a6b065db3a4158dfd04e6664cdb48

Contents?: true

Size: 1.87 KB

Versions: 38

Compression:

Stored size: 1.87 KB

Contents

require 'shoulda/active_record/helpers'
require 'shoulda/active_record/matchers/validation_matcher'
require 'shoulda/active_record/matchers/allow_value_matcher'
require 'shoulda/active_record/matchers/ensure_length_of_matcher'
require 'shoulda/active_record/matchers/ensure_inclusion_of_matcher'
require 'shoulda/active_record/matchers/validate_presence_of_matcher'
require 'shoulda/active_record/matchers/validate_format_of_matcher'
require 'shoulda/active_record/matchers/validate_uniqueness_of_matcher'
require 'shoulda/active_record/matchers/validate_acceptance_of_matcher'
require 'shoulda/active_record/matchers/validate_numericality_of_matcher'
require 'shoulda/active_record/matchers/association_matcher'
require 'shoulda/active_record/matchers/have_db_column_matcher'
require 'shoulda/active_record/matchers/have_db_index_matcher'
require 'shoulda/active_record/matchers/have_readonly_attribute_matcher'
require 'shoulda/active_record/matchers/allow_mass_assignment_of_matcher'
require 'shoulda/active_record/matchers/have_named_scope_matcher'


module Shoulda # :nodoc:
  module ActiveRecord # :nodoc:
    # = Matchers for your active record models
    #
    # These matchers will test most of the validations and associations for your
    # ActiveRecord models.
    #
    #   describe User do
    #     it { should validate_presence_of(:name) }
    #     it { should validate_presence_of(:phone_number) }
    #     %w(abcd 1234).each do |value|
    #       it { should_not allow_value(value).for(:phone_number) }
    #     end
    #     it { should allow_value("(123) 456-7890").for(:phone_number) }
    #     it { should_not allow_mass_assignment_of(:password) }
    #     it { should have_one(:profile) }
    #     it { should have_many(:dogs) }
    #     it { should have_many(:messes).through(:dogs) }
    #     it { should belong_to(:lover) }
    #   end
    #
    module Matchers
    end
  end
end

Version data entries

38 entries across 38 versions & 10 rubygems

Version Path
auser-poolparty-1.3.0 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.1 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.10 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.11 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.12 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.13 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.14 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.15 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.16 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.17 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.2 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.3 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.4 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.5 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.6 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.7 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
auser-poolparty-1.3.8 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
fairchild-poolparty-1.3.17 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
fairchild-poolparty-1.3.5 vendor/gems/shoulda/lib/shoulda/active_record/matchers.rb
iGEL-shoulda-2.10.2 lib/shoulda/active_record/matchers.rb