Created
October 20, 2018 15:17
-
-
Save pascalesdedy/53f79818467c6880b0e65f65499f7efa to your computer and use it in GitHub Desktop.
spec/model/article_spec.rb - used for Simple CRUD TDD
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 Article, type: :model do | |
# Validation tests | |
# ensure columns title and created_by are present before saving | |
it { should validate_presence_of(:title) } | |
it { should validate_presence_of(:content) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment