Sha256: 24a38e8bce952031f012507df8ad517943268d7d489c1d94f05268ae70ddf5a6

Contents?: true

Size: 795 Bytes

Versions: 20

Compression:

Stored size: 795 Bytes

Contents

require 'spec_helper'

describe RTurk do
  
  before(:all) do
    @aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml')))
  end
  
  it 'should allow me to set it up with credentials' do
    RTurk.setup(@aws['AWSAccessKeyId'], @aws['AWSAccessKey'], :sandbox => true)
    RTurk.secret_key.should eql @aws['AWSAccessKey']
  end
  
  
  it "should be able to tell when it's in sandbox" do 
    RTurk.setup(@aws['AWSAccessKeyId'], @aws['AWSAccessKey'], :sandbox => true)
    RTurk.secret_key.should eql @aws['AWSAccessKey']
    RTurk.sandbox?
  end
  
  it "should return its environment as production, the default" do
    aws = YAML.load(File.open(File.join(SPEC_ROOT, 'mturk.yml')))
    RTurk.setup(aws['AWSAccessKeyId'], aws['AWSAccessKey'])
    RTurk.sandbox?.should be_false
  end
  
end

Version data entries

20 entries across 20 versions & 1 rubygems

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