test/support/models.rb in validators-2.6.0 vs test/support/models.rb in validators-2.7.0
- old
+ new
@@ -56,15 +56,15 @@
def initialize(host)
@host = host
end
end
-class Site
+class EmailWithTLD
include ActiveModel::Validations
- attr_accessor :slug
+ attr_accessor :email
- validates_subdomain :slug
+ validates_email :email, tld: true
- def initialize(slug)
- @slug = slug
+ def initialize(email)
+ @email = email
end
end