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