Sha256: ea2566ebdc466a89fbea3102d7592d24df08d5a1b967eddb0a4c3038139f0320
Contents?: true
Size: 521 Bytes
Versions: 7
Compression:
Stored size: 521 Bytes
Contents
require 'spec_helper_models' describe Gaku::Level do describe 'validations' do it { should validate_presence_of :name } it { should validate_uniqueness_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
7 entries across 7 versions & 1 rubygems