Skip to content

Instantly share code, notes, and snippets.

@thoughtbot
Created August 4, 2009 22:29
Show Gist options
  • Save thoughtbot/162349 to your computer and use it in GitHub Desktop.
Save thoughtbot/162349 to your computer and use it in GitHub Desktop.
class HouseSearchTest < ActiveSupport::TestCase
should "produce an error on the :price field when sent #new with an invalid price range" do
house_search = HouseSearch.new(:price => 'unknown')
assert_kind_of ActiveRecord::Errors, house_search.errors
assert_not_nil house_search.errors.on(:price)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment