Sha256: d923eaef6dbd0e0f2d68ac12180a8071847f0abe1aa1511ea10f35ee8303af5f

Contents?: true

Size: 417 Bytes

Versions: 4

Compression:

Stored size: 417 Bytes

Contents

require 'spec_helper'

describe Simple::Validators::EmailValidator do
  let(:user) { User.new }
  describe "with an invalid email" do
    it "marks the record as invalid" do
      user.email = "invalid"
      expect(user).to_not be_valid
    end
  end

  describe "with a valid email" do
    it "does marks the record as valid" do
      user.email = "bob@example.org"
      expect(user).to be_valid
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple-validators-1.2.0 spec/validators/email_validator_spec.rb
simple-validators-1.1.0 spec/validators/email_validator_spec.rb
simple-validators-1.0.1 spec/validators/email_validator_spec.rb
simple-validators-1.0.0 spec/validators/email_validator_spec.rb