Sha256: 4e886777cd3b1d842f52e5c9fe20bc9e90247e4f31bc402d647cc2663df44440

Contents?: true

Size: 417 Bytes

Versions: 7

Compression:

Stored size: 417 Bytes

Contents

require 'spec_helper_models'

describe Gaku::ExamSyllabus do

  describe 'relations' do
    it { should belong_to :exam }
    it { should belong_to :syllabus }
  end

  describe 'validations' do
    it { should validate_presence_of :exam_id }
    it { should validate_presence_of :syllabus_id }
    it { should validate_uniqueness_of(:syllabus_id).scoped_to(:exam_id).with_message(/Exam already added!/) }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gaku-0.2.4 core/spec/models/exam_syllabus_spec.rb
gaku-0.2.3 core/spec/models/exam_syllabus_spec.rb
gaku-0.2.2 core/spec/models/exam_syllabus_spec.rb
gaku-0.2.1 core/spec/models/exam_syllabus_spec.rb
gaku-0.2.0 core/spec/models/exam_syllabus_spec.rb
gaku-0.1.1 core/spec/models/exam_syllabus_spec.rb
gaku-0.1.0 core/spec/models/exam_syllabus_spec.rb