Created
November 17, 2008 01:13
-
-
Save auser/25624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "create_snapshot" do | |
# We can assume that create_snapshot on the ec2 gem works | |
before(:each) do | |
@tr.ec2.stub!(:create_snapshot).and_return nil | |
end | |
it "should create a snapshot of the current EBS volume" do | |
#@tr.ec2.stub!(:ebs_volume_id).and_return { "vol-123" } | |
@tr.ec2.stub!(:create_snapshot).and_return {"snapshotId" => "snap-123"} | |
@tr.ebs_volume_id = "vol-123" | |
@tr.create_snapshot.should == {"snapshotId" => "snap-123"} | |
end | |
it "should not create a snapshot if there is no EBS volume" do | |
@tr.create_snapshot.should == nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment