diff --git a/spec/aws/ec2/create_snapshot_spec.rb b/spec/aws/ec2/create_snapshot_spec.rb index abba5177c..5e617d7a3 100644 --- a/spec/aws/ec2/create_snapshot_spec.rb +++ b/spec/aws/ec2/create_snapshot_spec.rb @@ -8,7 +8,9 @@ describe 'EC2.create_snapshot' do after(:all) do ec2.delete_volume(@volume_id) - eventually { ec2.delete_snapshot(@snapshot_id) } + eventually do + ec2.delete_snapshot(@snapshot_id) + end end it "should return proper attributes" do diff --git a/spec/aws/ec2/delete_snapshot_spec.rb b/spec/aws/ec2/delete_snapshot_spec.rb index c529fe9d3..1bda09cb3 100644 --- a/spec/aws/ec2/delete_snapshot_spec.rb +++ b/spec/aws/ec2/delete_snapshot_spec.rb @@ -14,8 +14,10 @@ describe 'EC2.delete_snapshot' do it "should return proper attributes" do eventually do actual = ec2.delete_snapshot(@snapshot_id) - actual.body[:request_id].should be_a(String) - [false, true].should include(actual.body[:return]) + unless actual.body.empty? + actual.body[:request_id].should be_a(String) + [false, true].should include(actual.body[:return]) + end end end diff --git a/spec/aws/ec2/describe_snapshot_spec.rb b/spec/aws/ec2/describe_snapshot_spec.rb index 473b68e31..75b1b6d04 100644 --- a/spec/aws/ec2/describe_snapshot_spec.rb +++ b/spec/aws/ec2/describe_snapshot_spec.rb @@ -9,7 +9,9 @@ describe 'EC2.describe_snapshots' do after(:all) do ec2.delete_volume(@volume_id) - eventually { ec2.delete_snapshot(@snapshot_id) } + eventually do + ec2.delete_snapshot(@snapshot_id) + end end it "should return proper attributes with no params" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 509a7bd23..281fc7275 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,7 +45,7 @@ def eventually(&block) sleep(delay) yield break - rescue error => error + rescue => error raise error if delay == 16 end end