Sha256: b96160eb9400caa044c82572c891ec63b21cfc53b421a1c8a7f4d5714d7a4b59
Contents?: true
Size: 813 Bytes
Versions: 31
Compression:
Stored size: 813 Bytes
Contents
require 'spec_helper' module Quby::Questionnaires::Entities describe SubscoreSchema do let(:key) { :totaal } let(:export_key) { :tot } let(:options) { {key: key, export_key: export_key, label: 'Somscore'} } subject { SubscoreSchema.new options } it 'is valid' do expect(subject).to be_valid end describe 'if key is not a symbol' do let(:key) { 'totaal' } it 'is invalid' do expect(subject).to be_invalid expect(subject.errors.full_messages).to eq(["Key is not a symbol"]) end end describe 'if export_key is not a symbol' do let(:export_key) { 'tot' } it 'is invalid' do expect(subject).to be_invalid expect(subject.errors.full_messages).to eq(["Export key is not a symbol"]) end end end end
Version data entries
31 entries across 31 versions & 1 rubygems