public function test_custom_message() { BookNumericality::$validates_numericality_of = array(array('numeric_test', 'message' => 'Hello')); $book = new BookNumericality(array('numeric_test' => 'NaN')); $book->is_valid(); $this->assert_equals(array('Numeric test Hello'), $book->errors->full_messages()); }