Sha256: b9c6b05fc8a3a20d9d0cd962161fe7858f6cd6f3162ace78bbe897eb49a366f5

Contents?: true

Size: 810 Bytes

Versions: 2

Compression:

Stored size: 810 Bytes

Contents

shared_examples_for "Server" do

  describe "#reboot" do

    it "should succeed" do
      subject.save
      subject.wait_for { ready? }
      subject.reboot.should be_true
    end

  end

  describe "#reload" do

    it "should reset attributes to remote state" do
      subject.save
      subject.wait_for { ready? }
      @reloaded = subject.reload
      subject.attributes.should == @reloaded.attributes
    end

  end

  describe "#save" do

    it "should return true when it succeeds" do
      subject.save.should be_true
    end

    it "should not exist remotely before save" do
      @servers.get(subject.id).should be_nil
    end

    it "should exist remotely after save" do
      subject.save
      subject.wait_for { ready? }
      @servers.get(subject.id).should_not be_nil
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-0.0.41 spec/shared_examples/server_examples.rb
fog-0.0.40 spec/shared_examples/server_examples.rb