Sha256: 4a04c39d5f4c4e992eaa229c53ef8a0070df5bdc20e2bd81fb010853a72b6c59

Contents?: true

Size: 684 Bytes

Versions: 6

Compression:

Stored size: 684 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
require 'rturk/builders/answer_key_builder'

module RTurk
  describe AnswerKey do

    before(:all) do
    end

    class SillyAnswerKey < AnswerKey
      def answer_key_content
        Question "Why did the chicken cross the road?"
      end
    end

    it "is an abstract base class that calls down to 'answer_key_content' in its concrete subclasses" do
      RTurk::SillyAnswerKey.new.to_xml.should ==
        "<AnswerKey xmlns=\"#{RTurk::AnswerKey::XMLNS}\">" +
          "<Question>Why did the chicken cross the road?</Question>" +
        "</AnswerKey>"
    end

    # todo: test more

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rturk-2.12.1 spec/builders/answer_key_builder_spec.rb
rturk-2.12.0 spec/builders/answer_key_builder_spec.rb
rturk-2.11.3 spec/builders/answer_key_builder_spec.rb
rturk-2.11.2 spec/builders/answer_key_builder_spec.rb
rturk-2.11.1 spec/builders/answer_key_builder_spec.rb
rturk-2.11.0 spec/builders/answer_key_builder_spec.rb