1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/test/unit/user_test.rb

14 lines
388 B
Ruby
Raw Normal View History

require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
load_all_fixtures
should_have_many :posts
should_not_allow_values_for :email, "blah", "b lah"
should_allow_values_for :email, "a@b.com", "asdf@asdf.com"
should_ensure_length_in_range :email, 1..100
should_ensure_value_in_range :age, 1..100
should_protect_attributes :password
end