title: What is the best practice to use asserts in Ruby, but not as part of unit tests?
body: <p>I want to use an assert to raise an error within a rake task.</p>
  
  <pre><code>the_index = items.index(some_item)
  assert_not_nil the_index, "Lookup failed for the following item: " + some_item
  </code></pre>
  
  <p>I get <code>undefined method assert_not_nil</code>. Can I include the assertions file in my rake task? How?</p>
  
  <p>Is this a best practice, or is there a better way to do it?</p>
  
  <p>Working in Ruby 1.9.2.</p>