1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/spec/rackspace/models/compute/servers_spec.rb
2010-09-09 17:50:38 -07:00

22 lines
596 B
Ruby

require File.dirname(__FILE__) + '/../../../spec_helper'
require File.dirname(__FILE__) + '/../../../shared_examples/servers_examples'
describe 'Fog::Rackspace::Compute::Servers' do
it_should_behave_like "Servers"
# flavor 1 = 256, image 49 = Ubuntu 10.04 LTS (lucid)
subject { @server = @servers.new(:flavor_id => 1, :image_id => 49, :name => "fog_#{Time.now.to_i}") }
before(:each) do
@servers = Rackspace[:compute].servers
end
after(:each) do
if @server && !@server.new_record?
@server.wait_for { ready? }
@server.destroy.should be_true
end
end
end