Parent

Included Modules

Class/Module Index [+]

Quicksearch

RackspaceTest::ApiTest

Public Instance Methods

app() click to toggle source
# File tests/drivers/rackspace/api_test.rb, line 9
def app
  Sinatra::Application
end
test_01_it_returns_entry_points() click to toggle source
# File tests/drivers/rackspace/api_test.rb, line 13
def test_01_it_returns_entry_points
  get_auth_url '/api;driver=rackspace/?force_auth=1'
  (last_xml_response/'/api').first[:driver].should == 'rackspace'
  (last_xml_response/'/api/link').length.should > 0
end
test_02_it_has_rackspace_features() click to toggle source
# File tests/drivers/rackspace/api_test.rb, line 19
def test_02_it_has_rackspace_features
  get_url '/api;driver=rackspace'
  features = (last_xml_response/'/api/link[@rel="instances"]/feature').collect { |f| f[:name] }
  features.include?('user_name').should == true
  features.include?('authentication_password').should == true
  features.include?('user_files').should == true
  features.length.should == 3
end
test_03_it_has_rackspace_collections() click to toggle source
# File tests/drivers/rackspace/api_test.rb, line 28
def test_03_it_has_rackspace_collections
  get_url '/api;driver=rackspace'
  collections = (last_xml_response/'/api/link').collect { |f| f[:rel] }
  collections.include?('instance_states').should == true
  collections.include?('instances').should == true
  collections.include?('images').should == true
  collections.include?('buckets').should == true
  collections.include?('realms').should == true
  collections.include?('hardware_profiles').should == true
  collections.length.should == 7
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.