lib/torpedo/compute/flavors.rb in torpedo-1.0.19 vs lib/torpedo/compute/flavors.rb in torpedo-2.1.0

- old
+ new

@@ -1,34 +1,34 @@ require File.dirname(__FILE__) + '/helper' module Torpedo -module Compute -class Flavors < Test::Unit::TestCase + module Compute + class Flavors < Test::Unit::TestCase - def setup - @conn=Helper::get_connection - end + def setup + @conn=Helper::get_connection + end - def test_list + def test_list - @conn.flavors.each do |flavor| - assert_not_nil(flavor[:id]) - assert_not_nil(flavor[:name]) - assert_not_nil(flavor[:ram]) - assert_not_nil(flavor[:disk]) - end + @conn.flavors.each do |flavor| + assert_not_nil(flavor.id) + assert_not_nil(flavor.name) + assert_not_nil(flavor.ram) + assert_not_nil(flavor.disk) + end - end + end - def test_get + def test_get - flavor = @conn.flavor(1) - assert_not_nil(flavor.id) - assert_not_nil(flavor.name) - assert_not_nil(flavor.ram) - assert_not_nil(flavor.disk) + flavor = @conn.flavors.get(1) + assert_not_nil(flavor.id) + assert_not_nil(flavor.name) + assert_not_nil(flavor.ram) + assert_not_nil(flavor.disk) - end + end -end -end + end + end end