public
Rubygem
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/thoughtbot/shoulda.git
shoulda / test / unit / address_test.rb
100644 12 lines (8 sloc) 0.335 kb
1
2
3
4
5
6
7
8
9
10
11
12
require File.dirname(__FILE__) + '/../test_helper'
 
class AddressTest < Test::Unit::TestCase
  load_all_fixtures
  should_belong_to :addressable
  should_require_unique_attributes :title, :scoped_to => [:addressable_id, :addressable_type]
  
  
  should_ensure_length_at_least :zip, 5
  should_only_allow_numeric_values_for :zip
end