Sha256: 65d0f72830b8e8eea9313545c99426024340fae4820c97655dcad62a116f5989
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) describe RTurk::CreateQualificationType do before(:all) do aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml'))) RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true) faker('create_qualification_type', :operation => 'CreateQualificationType') end it "should ensure required params" do lambda{RTurk::CreateQualificationType()}.should raise_error RTurk::MissingParameters end it "should successfully request the operation" do RTurk::Requester.should_receive(:request).once.with( hash_including('Operation' => 'CreateQualificationType')) RTurk::CreateQualificationType(:name => "bogus") rescue RTurk::InvalidRequest end it "should parse and return the result" do response = RTurk::CreateQualificationType(:name => "bogus") response['CreateQualificationTypeResponse']['QualificationType']['QualificationTypeId'].should == "ZSPJXD4F1SFZP7YNJWR0" response.qualification_type_id.should == "ZSPJXD4F1SFZP7YNJWR0" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rturk-2.3.0 | spec/operations/create_qualification_type_spec.rb |