From 0557b1625e5625e092f593bb18e348dbce7f6bf9 Mon Sep 17 00:00:00 2001 From: geemus Date: Wed, 5 May 2010 16:11:47 -0700 Subject: [PATCH] [s3] fix nil expectations to match new parsers --- spec/aws/requests/s3/get_bucket_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/aws/requests/s3/get_bucket_spec.rb b/spec/aws/requests/s3/get_bucket_spec.rb index a88d22adb..00e00cb1d 100644 --- a/spec/aws/requests/s3/get_bucket_spec.rb +++ b/spec/aws/requests/s3/get_bucket_spec.rb @@ -3,13 +3,13 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe 'S3.get_bucket' do describe 'success' do - before(:each) do + before(:all) do AWS[:s3].put_bucket('foggetbucket') AWS[:s3].put_object('foggetbucket', 'fog_object', lorem_file) AWS[:s3].put_object('foggetbucket', 'fog_other_object', lorem_file) end - after(:each) do + after(:all) do AWS[:s3].delete_object('foggetbucket', 'fog_object') AWS[:s3].delete_object('foggetbucket', 'fog_other_object') AWS[:s3].delete_bucket('foggetbucket') @@ -18,10 +18,10 @@ describe 'S3.get_bucket' do it 'should return proper attributes' do actual = AWS[:s3].get_bucket('foggetbucket') actual.body['IsTruncated'].should == false - actual.body['Marker'].should be_a(String) + actual.body['Marker'].should be_nil actual.body['MaxKeys'].should be_an(Integer) actual.body['Name'].should be_a(String) - actual.body['Prefix'].should be_a(String) + actual.body['Prefix'].should be_nil actual.body['Contents'].should be_an(Array) actual.body['Contents'].length.should == 2 object = actual.body['Contents'].first @@ -41,7 +41,7 @@ describe 'S3.get_bucket' do actual.body['Marker'].should be_a(String) actual.body['MaxKeys'].should be_an(Integer) actual.body['Name'].should be_a(String) - actual.body['Prefix'].should be_a(String) + actual.body['Prefix'].should be_nil actual.body['Contents'].should be_an(Array) actual.body['Contents'].length.should == 1 object = actual.body['Contents'].first @@ -55,13 +55,13 @@ describe 'S3.get_bucket' do object['StorageClass'].should be_a(String) end - it 'should respect max-keys option' do + it 'should accept max-keys option' do actual = AWS[:s3].get_bucket('foggetbucket', 'max-keys' => 1) actual.body['IsTruncated'].should == true - actual.body['Marker'].should be_a(String) + actual.body['Marker'].should be_nil actual.body['MaxKeys'].should be_an(Integer) actual.body['Name'].should be_a(String) - actual.body['Prefix'].should be_a(String) + actual.body['Prefix'].should be_nil actual.body['Contents'].should be_an(Array) actual.body['Contents'].length.should == 1 object = actual.body['Contents'].first @@ -78,7 +78,7 @@ describe 'S3.get_bucket' do it 'should accept prefix option' do actual = AWS[:s3].get_bucket('foggetbucket', 'prefix' => 'fog_ob') actual.body['IsTruncated'].should == false - actual.body['Marker'].should be_a(String) + actual.body['Marker'].should be_nil actual.body['MaxKeys'].should be_an(Integer) actual.body['Name'].should be_a(String) actual.body['Prefix'].should be_a(String)