Created
January 13, 2014 16:46
-
-
Save wlangstroth/8403562 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative '../test_helper' | |
class ThingTest < ActiveSupport::TestCase | |
def test_fixtures | |
Thing.all.each do |thing| | |
assert thing.valid?, thing.errors.inspect | |
end | |
end | |
def test_validations | |
thing = Thing.new | |
assert thing.invalid? | |
assert_has_errors_on thing, | |
:name => ["can't be blank"], | |
:short_name => ["can't be blank"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment