Guest User

Untitled

a guest
Jun 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. test "should validate numericality" do
  2. o = Object.new(:number => 'not a number')
  3. assert !o.errors.empty?
  4. end
  5.  
  6. #you can just write:
  7.  
  8. should validate_numericality_of(:number)
Add Comment
Please, Sign In to add comment