From 404555f674aba47f0e34ffbfa06ba14b646b23f7 Mon Sep 17 00:00:00 2001 From: Mark Moser Date: Mon, 22 Aug 2016 11:47:38 -0500 Subject: [PATCH] remove loose class in email validation test --- test/test_helpers/email_validatable.rb | 5 +++++ test/validators/email_format_validator_test.rb | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 test/test_helpers/email_validatable.rb 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