I have a member of my model that has these validations
validates :status, :presence => true, :numericality => {:only_integer => true}
In order to test that, my plan was to make a fixture that just has a perfectly valid instance of the model, and then do a test to make sure that was valid, another test to make sure setting game_status to nil was invalid, and 3 tests for the numericality: one that tests that it's invalid if i set it to a string, one that tests that it's invalid if i set it to a decimal, and one that tests that it's valid if i set it to an integer.
Overall, 5 tests to test 2 pieces of simple rails validation feels like i might be going overboard, especially when i add another member just like status that requires almost the same validations. I know rspec has things like should_validate_presence_of, but for my first project I want to use test::unit.
If that's the normal way to do things in rails, I'm fine doing it. But if there's a simpler way I'd rather do that. Or do you typically not test such simple things?
I'm not looking for a gem to abstract everything away for this, unless doing that is pretty much the accepted standard. Otherwise, I'd like to just use basic test::unit in a way that conforms to general rails best practices.