I want to use an assert to raise an error within a rake task.
the_index = items.index(some_item)
assert_not_nil the_index, "Lookup failed for the following item: " + some_item
I get undefined method assert_not_nil
. Can I include the assertions file in my rake task? How?
Is this a best practice, or is there a better way to do it?
Working in Ruby 1.9.2.