Sha256: 3a4d771ded678117dfa6df28649d7eb34f3780a06a3242a51c0e6441c71514b7

Contents?: true

Size: 813 Bytes

Versions: 8

Compression:

Stored size: 813 Bytes

Contents

require "ar_helper"
require "study_engine/answer"

module StudyEngine
  describe Answer do
    its(:result) { should be_nil }

    describe "#response" do
      it "returns a value object" do
        subject.response_id = "OMG"
        subject.response_promis_id = "1"
        subject.response_title = "WTF"
        subject.response.should == CatEngine::Response.new(id: "OMG", promis_id: "1", title: "WTF")
      end
    end

    describe "#question" do
      it "returns a value object" do
        subject.question_id = "OMG"
        subject.question_promis_id = "123"
        subject.question_context = "WTF"
        subject.question_title = "BBQ"
        subject.question.should == CatEngine::Question.new(id: "OMG", promis_id: "123", context: "WTF", title: "BBQ", responses: [])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
study_engine-0.3.1 spec/models/study_engine/answer_spec.rb
study_engine-0.3.0 spec/models/study_engine/answer_spec.rb
study_engine-0.2.2 spec/models/study_engine/answer_spec.rb
study_engine-0.2.1 spec/models/study_engine/answer_spec.rb
study_engine-0.2.0 spec/models/study_engine/answer_spec.rb
study_engine-0.1.1 spec/models/study_engine/answer_spec.rb
study_engine-0.1.0 spec/models/study_engine/answer_spec.rb
study_engine-0.0.2 spec/models/study_engine/answer_spec.rb