Sha256: de594e661ee54d6cdc5b9cd9085d38af99a4238c58733859de67243173e4f9cc

Contents?: true

Size: 522 Bytes

Versions: 3

Compression:

Stored size: 522 Bytes

Contents

require 'spec_helper'

describe Gaku::Achievement do

  describe 'relations' do
    it { should have_many :student_achievements }
    it { should have_many(:students).through(:student_achievements) }
    it { should belong_to :external_school_record }
  end

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

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

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