Sha256: d5cf9655b300eefd908529cc4fd9be40f0519c04884c5cab0b19a9521d1cef04

Contents?: true

Size: 535 Bytes

Versions: 38

Compression:

Stored size: 535 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class PostTest < ActiveSupport::TestCase
  fixtures :all

  should_belong_to :user
  should_belong_to :owner
  should_have_many :tags, :through => :taggings
  should_have_many :through_tags, :through => :taggings

  should_validate_uniqueness_of :title
  should_validate_presence_of :body, :message => /wtf/
  should_validate_presence_of :title
  should_validate_numericality_of :user_id

  should_fail do
    should_validate_uniqueness_of :title, :case_sensitive => false
  end
end

Version data entries

38 entries across 38 versions & 10 rubygems

Version Path
thoughtbot-shoulda-2.10.2 test/unit/post_test.rb
lockbox_middleware-1.2.1 vendor/gems/shoulda-2.10.2/test/unit/post_test.rb
robert-shoulda-2.10.4 test/unit/post_test.rb
robert-shoulda-2.10.3 test/unit/post_test.rb
simply_stated-0.0.5 vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/post_test.rb
simply_stated-0.0.4 vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/post_test.rb
shoulda-2.10.3 test/unit/post_test.rb
tpitale-shoulda-2.11.0 test/unit/post_test.rb
shoulda-2.10.2 test/unit/post_test.rb
poolparty-1.3.15 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.14 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.13 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.8 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.7 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.6 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.4 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.3 vendor/gems/shoulda/test/unit/post_test.rb
poolparty-1.3.1 vendor/gems/shoulda/test/unit/post_test.rb