Sha256: f11fb7ddca2382add99b4ea33fca1725fbaebf6caa801c9705fd24dfd49522dc

Contents?: true

Size: 770 Bytes

Versions: 1

Compression:

Stored size: 770 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))

describe RTurk::RegisterHITType do

  before(:all) do
    aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml')))
    RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true)
    FakeWeb.clean_registry
    faker('register_hit_type', :operation => "RegisterHITType")
  end

  it "should rerturn a CreateHITResponse after the request" do
    response = RTurk::RegisterHITType(:title => "Look at some pictures from 4Chan") do |hit|
      hit.description = "foo"
      hit.reward = 0.05
      hit.qualifications.add(:adult, true)
    end
    response.is_a?(RTurk::RegisterHITTypeResponse).should be_true
    response.type_id.should == 'KZ3GKTRXBWGYX8WXBW60'
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rturk-2.0.4 spec/operations/register_hit_type_spec.rb