Created
July 30, 2016 01:06
-
-
Save kenzotakahashi/d6e1d8fed12f09064f9d62f6fc01c12f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
RSpec.describe User, type: :model do | |
describe ".is_gmail_user?" do | |
context "given a gmail address" do | |
it "returns true" do | |
user1 = User.new({email: 'kenzotakahashi@gmail.com'}) | |
expect(user1.is_gmail_user?).to eql(true) | |
end | |
end | |
context "given a non-gmail address" do | |
it "returns false" do | |
user1 = User.new({email: 'kenzo@itandi.co.jp'}) | |
expect(user1.is_gmail_user?).to eql(false) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment