Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failed on "should not allow an email without domain". #7

Open
alee-ccu opened this issue Nov 22, 2018 · 0 comments
Open

Tests failed on "should not allow an email without domain". #7

alee-ccu opened this issue Nov 22, 2018 · 0 comments

Comments

@alee-ccu
Copy link

Fetch the source from github and use rspec to run the tests. I got one test failed:

$ rspec 
Email validation
  with regular validator
    should not allow nil as email
    should not allow blank as email
    should not allow an email without domain extension
    should not allow an email without @
    should not allow an email without prefix
    should not allow an email without domain (FAILED - 1)
    should accept a valid email address
    should return an error message
  with allow nil
    should allow nil as email
    should not allow blank as email
    should allow a valid email address
    should return an error message
  with allow blank
    should allow nil as email
    should allow blank as email
    should allow a valid email address
    should return an error message
  with legacy syntax
    should allow nil as email
    should allow blank as email
    should allow a valid email address
    should not allow invalid email
    should return an error message
  with ActiveRecord
    should not allow invalid email
    should return an error message
  with ActiveRecord and legacy syntax
    should not allow invalid email
    should return an error message

Failures:

  1) Email validation with regular validator should not allow an email without domain
     Failure/Error: @user.should_not be_valid
       expected `#<User:0x0000562bca304408 @email_address="[email protected]", @validation_context=nil, @errors=#<ActiveModel::Errors:0x0000562bca367710 @base=#<User:0x0000562bca304408 ...>, @messages={}, @details={}>>.valid?` to return false, got true
     # ./spec/validate_email_spec.rb:51:in `block (3 levels) in <top (required)>'

Deprecation Warnings:

Using `should_not` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /home/alee/sources/rubygems/ruby-team/ruby-validate-email/spec/validate_email_spec.rb:26:in `block (3 levels) in <top (required)>'.


If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

1 deprecation warning total

Finished in 0.19688 seconds (files took 0.63895 seconds to load)
25 examples, 1 failure

Failed examples:

rspec ./spec/validate_email_spec.rb:49 # Email validation with regular validator should not allow an email without domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant