Sha256: d44f5a2f3c33857371fce6393b6438fdd531e72522e64d704ff76b5528b3ce4c

Contents?: true

Size: 494 Bytes

Versions: 5

Compression:

Stored size: 494 Bytes

Contents

require 'spec_helper_models'

describe Gaku::Attendance do

  describe 'relations' do
    it { should belong_to :attendance_type }
    it { should belong_to :attendancable }
    it { should belong_to :student }
  end

  describe 'validations' do
    it { should validate_presence_of :student }
    it { should validate_presence_of :attendance_type }
  end

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

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gaku-0.2.4 core/spec/models/attendance_spec.rb
gaku-0.2.3 core/spec/models/attendance_spec.rb
gaku-0.2.2 core/spec/models/attendance_spec.rb
gaku-0.2.1 core/spec/models/attendance_spec.rb
gaku-0.2.0 core/spec/models/attendance_spec.rb