title: Rails Test - How to test specific validation?
body: <p>Using default Rails test suite, how would I write tests that test certain validations only? For example, if I have validations for presence, numeric, and my own validator, how do I just test numeric?</p>
  
  <p>Say I don't have numeric validation working, so this test should fail:</p>
  
  <pre><code>test "should test numeric validator" do
      post = Post.new(:number =&gt; 'not a number')
      assert !post.save, "it saved a non-numeric value for :number"
  end
  </code></pre>
  
  <p>But it'll pass because my own validator didn't allow it to save for some other reason, so my test doesn't really test properly.</p>