Sha256: a12613a469eb25cdff6d9a1299a29a333ff3ccc559db1fdbb3203c94b1e3caef
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 Bytes
Contents
require 'spec_helper' describe Gaku::SchoolYear do describe 'associations' do it { should have_many :semesters} end describe 'validations' do it { should validate_presence_of :starting } it { should validate_presence_of :ending } it 'validation error for ending before after' do school_year = Gaku::SchoolYear.create starting: Date.parse('2013-4-8'), ending: Date.parse('2013-4-7') school_year.valid?.should be_false school_year.should have(1).error_on(:base) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gaku-0.0.3 | core/spec/models/school_year_spec.rb |
gaku-0.0.2 | core/spec/models/school_year_spec.rb |
gaku-0.0.1 | core/spec/models/school_year_spec.rb |