title: Validation fails when using validates_presence_of and validates_numericality_of
body: <p>I need to validate data in my model and then test this model using rspec:</p>
  
  <p>Here is the validation in model:</p>
  
  <pre class="lang-rb prettyprint-override"><code>validates_presence_of :sales_price
  validates_presence_of :retail_price
  
  validates_numericality_of :sales_price, :greater_than =&gt; 0
  validates_numericality_of :retail_price,:greater_than =&gt; 0
  validates_numericality_of :sales_price, :less_than =&gt; :retail_price,
                                            :message =&gt; "must be less than retail price."
  </code></pre>
  
  <p>when i'm trying to test tho model like this</p>
  
  <pre class="lang-rb prettyprint-override"><code>it { should validate_presence_of :sales_price }
  it { should validate_presence_of :retail_price }
  it { should validate_numericality_of :sales_price }
  it { should validate_numericality_of :retail_price }
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>Failure/Error: it { should validate_presence_of :retail_price }
   ArgumentError:
     comparison of Float with nil failed
   # ./spec/models/offer_option_spec.rb:19:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>How can i solve this?</p>