Sha256: beda79f9dd0351badf22b94217214b369264ed32137a58ef7c8d91b7c92a7303

Contents?: true

Size: 475 Bytes

Versions: 7

Compression:

Stored size: 475 Bytes

Contents

require 'spec_helper_models'

describe Gaku::Department do

  describe 'associations' do
    it { should have_many :specialties }
    it { should have_many :syllabuses }
    it { should have_many :exams }

  end

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

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

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gaku-0.2.4 core/spec/models/department_spec.rb
gaku-0.2.3 core/spec/models/department_spec.rb
gaku-0.2.2 core/spec/models/department_spec.rb
gaku-0.2.1 core/spec/models/department_spec.rb
gaku-0.2.0 core/spec/models/department_spec.rb
gaku-0.1.1 core/spec/models/department_spec.rb
gaku-0.1.0 core/spec/models/department_spec.rb