Sha256: 4b0c046d75c839bef2bd12a751cd8411433718b1e34cd9e4983e85ddd5a9a713

Contents?: true

Size: 832 Bytes

Versions: 18

Compression:

Stored size: 832 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)
    WebMock.reset!
    faker('register_hit_type', :operation => "RegisterHITType")

    @lambda = lambda 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
    end

  end

  it "should return a CreateHITResponse after the request" do
    response = @lambda.call
    response.is_a?(RTurk::RegisterHITTypeResponse).should be_true
    response.type_id.should == 'KZ3GKTRXBWGYX8WXBW60'
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rturk-2.12.1 spec/operations/register_hit_type_spec.rb
rturk-2.12.0 spec/operations/register_hit_type_spec.rb
rturk-2.11.3 spec/operations/register_hit_type_spec.rb
rturk-2.11.2 spec/operations/register_hit_type_spec.rb
rturk-2.11.1 spec/operations/register_hit_type_spec.rb
rturk-2.11.0 spec/operations/register_hit_type_spec.rb
rturk-2.10.3 spec/operations/register_hit_type_spec.rb
rturk-2.10.2 spec/operations/register_hit_type_spec.rb
rturk-2.10.1 spec/operations/register_hit_type_spec.rb
rturk-2.10.0 spec/operations/register_hit_type_spec.rb
rturk-2.9.0 spec/operations/register_hit_type_spec.rb
rturk-2.8.0 spec/operations/register_hit_type_spec.rb
rturk-2.7.0 spec/operations/register_hit_type_spec.rb
rturk-2.6.0 spec/operations/register_hit_type_spec.rb
rturk-2.5.2 spec/operations/register_hit_type_spec.rb
rturk-2.5.0 spec/operations/register_hit_type_spec.rb
rturk-2.4.1 spec/operations/register_hit_type_spec.rb
rturk-2.4.0 spec/operations/register_hit_type_spec.rb