Sha256: aa6ab835d3a23a3c6eba59944c73d2a6f2e23390ae18c7479ad5a2ca0049d7ac
Contents?: true
Size: 848 Bytes
Versions: 31
Compression:
Stored size: 848 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) describe RTurk::DisableHIT do before(:all) do aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml'))) RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true) faker('disable_hit', :operation => 'DisableHIT') end it "should ensure required params" do lambda{RTurk::DisableHIT()}.should raise_error(RTurk::MissingParameters) end it "should successfully request the operation" do RTurk::Requester.should_receive(:request).once.with( hash_including('Operation' => 'DisableHIT')) RTurk::DisableHIT(:hit_id => "123456789") rescue RTurk::InvalidRequest end it "should parse and return the result" do RTurk::DisableHIT(:hit_id => "123456789").should be_a_kind_of RTurk::Response end end
Version data entries
31 entries across 31 versions & 1 rubygems