Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.