thoughtbot / shoulda

Makes tests easy on the fingers and the eyes

This URL has Read+Write access

shoulda / test / unit / tag_test.rb
100644 15 lines (10 sloc) 0.311 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.dirname(__FILE__) + '/../test_helper'
 
class TagTest < Test::Unit::TestCase
  should_have_many :taggings, :dependent => :destroy
  should_have_many :posts
 
  should_ensure_length_at_least :name, 2
 
  should_protect_attributes :secret
 
  should_fail do
    should_protect_attributes :name
  end
end