Last active
January 23, 2020 13:21
-
-
Save roberson-miguel/0bdae75e1ddd12c8c9eae45ddd50c381 to your computer and use it in GitHub Desktop.
Test unitário em Rails
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
RSpec.describe Rental, type: :model do | |
context 'create a user new' do | |
it 'User is valid?' do | |
user = User.new(name: 'Roberson', email: 'roberson@gmail") | |
expect(user.valid?).to be_truthy | |
end | |
it 'User is invalid?' do | |
user = User.new(name: 'Roberson', email: nil) | |
expect(user.valid?).to be_falsey | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment