Sha256: 927750efb1e0942a29469d3037d2b7386b380c56f5a0aed8f8c466501074a394
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) describe RTurk::SendTestEventNotification do before(:each) do @lambda = lambda do n = RTurk::Notification.new n.transport = 'foo' n.destination = 'bar' n.event_type = 'baz' begin RTurk::SendTestEventNotification(:test_event_type => 'foo', :notification => n) rescue RTurk::InvalidRequest end end end before(:all) do aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml'))) RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'], :sandbox => true) faker('notify_workers', :operation => 'SendTestEventNotification') end it 'should ensure required params' do lambda { RTurk::SetHITTypeNotification(:subject => 'peruvian mcwallball') }.should raise_error RTurk::MissingParameters end it 'should successfully request the operation' do RTurk::Requester.should_receive(:request).once.with( hash_including('Operation' => 'SendTestEventNotification')) @lambda.call end it 'should parse and return the result' do @lambda.call.should be_a_kind_of RTurk::Response end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rturk-2.0.5 | spec/operations/send_test_event_notification_spec.rb |