require 'rails_helper' RSpec.describe UserAccount, type: :model do it { should have_secure_password } it { should validate_presence_of(:email) } it { should validate_presence_of(:first_name) } it { should validate_presence_of(:last_name) } it { should validate_inclusion_of(:role).in_array(%w[master regular]) } describe '#full_name' do it "renders the user's full name" do user = create(:user_account, first_name: 'Mobius', last_name: 'One') expect(user.full_name).to eq('Mobius One') end end end