tests/xenserver/models/compute/server_tests.rb in fog-1.22.0 vs tests/xenserver/models/compute/server_tests.rb in fog-1.22.1
- old
+ new
@@ -5,11 +5,11 @@
servers = connection.servers
# pre-flight cleanup
(servers.all :name_matches => test_ephemeral_vm_name).each do |s|
s.destroy
end
- (servers.templates.find_all { |t| t.name == test_ephemeral_vm_name}).each do |s|
+ (servers.templates.select { |t| t.name == test_ephemeral_vm_name}).each do |s|
s.destroy
end
server = Fog::Compute[:xenserver].servers.create(:name => test_ephemeral_vm_name,
:template_name => test_template_name)
@@ -68,10 +68,10 @@
test("#{attribute}") { server.respond_to? attribute }
end
end
tests("The attributes hash should have key") do
attributes.each do |attribute|
- test("#{attribute}") { model_attribute_hash.has_key? attribute }
+ test("#{attribute}") { model_attribute_hash.key? attribute }
end
end
end
test('be a kind of Fog::Compute::XenServer::Server') { server.kind_of? Fog::Compute::XenServer::Server }