Sha256: 4ee0bf7284bd091c6a359b7784d3ca9e8f8f1d3b8b0374ad4a2a67d5d675ad40

Contents?: true

Size: 467 Bytes

Versions: 3

Compression:

Stored size: 467 Bytes

Contents

require 'spec_helper'

describe Gaku::Level do

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

  describe 'relations' do
    it { should have_many :program_levels }
    it { should have_many(:programs).through(:program_levels) }
    it { should belong_to :school }
  end

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

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