Sha256: 231db628f7ffc29d872c358945319effea4289df7912799f013a8f168dbae17c

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

require 'spec_helper'

describe Gaku::AttendanceType do

  describe 'relations' do
    it { should have_many :attendances }
  end

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

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

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