class Object
Public Instance Methods
stringified(hash)
click to toggle source
# File lib/quby/answers/specs/repo_specs.rb, line 133 def stringified(hash) result = {} hash.each do |key, value| case value when Hash result[key.to_s] = stringified(value) else result[key.to_s] = value end end result end
verify(record)
click to toggle source
# File lib/quby/answers/specs/repo_specs.rb, line 116 def verify(record) expect(record.questionnaire_key).to eq('simple') expect(record.raw_params).to eq(stringified(attributes[:raw_params])) expect(record.value).to eq(stringified(attributes[:value])) expect(record.patient).to eq(stringified(attributes[:patient])) expect(record.active).to eq(true) expect(record.test).to eq(false) expect(record.started_at).to eq(attributes[:started_at]) expect(record.completed_at).to eq(attributes[:completed_at]) expect(record.outcome_generated_at).to eq(attributes[:outcome_generated_at]) expect(record.scores).to eq(stringified(attributes[:scores])) expect(record.actions).to eq(stringified(attributes[:actions])) expect(record.completion).to eq(stringified(attributes[:completion])) expect(record.import_notes).to eq(stringified(attributes[:import_notes])) expect(record.dsl_last_update).to be_present end