diff --git a/test/test_helpers/email_validatable.rb b/test/test_helpers/email_validatable.rb new file mode 100644 index 0000000..f9920f0 --- /dev/null +++ b/test/test_helpers/email_validatable.rb @@ -0,0 +1,5 @@ +class EmailValidatable + include ActiveModel::Validations + attr_accessor :email + validates :email, email_format: true +end diff --git a/test/validators/email_format_validator_test.rb b/test/validators/email_format_validator_test.rb index 2de25a8..619a6a7 100644 --- a/test/validators/email_format_validator_test.rb +++ b/test/validators/email_format_validator_test.rb @@ -1,11 +1,5 @@ require 'test_helper' -class EmailValidatable - include ActiveModel::Validations - attr_accessor :email - validates :email, email_format: true -end - class EmailFormatValidatorTest < ActiveSupport::TestCase test "tld length" do obj = EmailValidatable.new