Sha256: 617de46f473f3e1650d229fd43261affdbb995fc31ef2e7967788828b50d44a0

Contents?: true

Size: 447 Bytes

Versions: 7

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper_models'

describe Gaku::CourseGroup do

  describe 'associations' do
    it { should have_many :course_group_enrollments }
    it { should have_many(:courses).through(:course_group_enrollments) }
  end

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

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

end

Version data entries

7 entries across 7 versions & 1 rubygems

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