Sha256: 16f0d9d200631d8c165ebc8c9c8481b8d0f405e1706efc07363a433c9254c5f4
Contents?: true
Size: 632 Bytes
Versions: 7
Compression:
Stored size: 632 Bytes
Contents
require 'spec_helper_models' describe Gaku::Specialty do describe 'associations' do it { should have_many :student_specialties } it { should have_many(:students).through(:student_specialties) } it { should have_many(:program_specialties) } it { should have_many(:programs).through(:program_specialties) } it { should belong_to :department } end describe 'validations' do it { should validate_presence_of :name } it { should validate_uniqueness_of :name } end describe '#to_s' do let(:specialty) { build(:specialty) } specify { specialty.to_s.should eq specialty.name } end end
Version data entries
7 entries across 7 versions & 1 rubygems