Sha256: 23d1822d2f1326ec693c4e3d6c2cf2e9d98f7952ebf22cbfeddd7b95dc772ca0

Contents?: true

Size: 537 Bytes

Versions: 3

Compression:

Stored size: 537 Bytes

Contents

require 'spec_helper'

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) }
  end

  describe 'validations' do
    it { should validate_presence_of :name }
  end

  describe '#to_s' do
    let(:specialty) { build(:specialty) }
    specify { specialty.to_s.should eq specialty.name }
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gaku-0.0.3 core/spec/models/specialty_spec.rb
gaku-0.0.2 core/spec/models/specialty_spec.rb
gaku-0.0.1 core/spec/models/specialty_spec.rb