Sha256: 2837043b9335f45c8cb2005b86bb927aa4f86cb3588c3f54958d64979a57e001

Contents?: true

Size: 570 Bytes

Versions: 3

Compression:

Stored size: 570 Bytes

Contents

require 'spec_helper'

describe Gaku::GradingMethod do

  describe 'relations' do
  	it { should have_one :exam }
  	it { should have_one :exam_portion }
  	it { should have_one :assignment }

    it { should have_many :grading_method_set_items }
    it { should have_many(:grading_method_sets).through(:grading_method_set_items) }
  end

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

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

end

Version data entries

3 entries across 3 versions & 1 rubygems

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