1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

fix up eventually calls

This commit is contained in:
Wesley Beary 2009-07-19 16:06:33 -07:00
parent f072170cd6
commit b21946f475
4 changed files with 11 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -45,7 +45,7 @@ def eventually(&block)
sleep(delay)
yield
break
rescue error => error
rescue => error
raise error if delay == 16
end
end