Skip to content

Instantly share code, notes, and snippets.

@memaker
Last active November 11, 2016 22:20
Show Gist options
  • Save memaker/474a24d2f8319d09b81b1423d9f87f3c to your computer and use it in GitHub Desktop.
Save memaker/474a24d2f8319d09b81b1423d9f87f3c to your computer and use it in GitHub Desktop.
# spec/models/user_spec.rb
require 'rails_helper'
RSpec.describe User, type: :model do
it { should validate_presence_of(:email) }
it { should validate_presence_of(:name) }
it { should validate_uniqueness_of(:email) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment