for something like this in rails model
...
validates :points, :numericality => {:greater_than_or_equal_to => 0}, :allow_nil => true
...
test can be :
it { should validate_numericality_of(:points) }
it { should_not allow_value(-1).for(:points) }