Parent

Included Modules

Class/Module Index [+]

Quicksearch

RackspaceTest::RealmsTest

Public Instance Methods

app() click to toggle source
# File tests/drivers/rackspace/realms_test.rb, line 9
def app
  Sinatra::Application
end
test_01_it_returns_realms() click to toggle source
# File tests/drivers/rackspace/realms_test.rb, line 13
def test_01_it_returns_realms
  get_auth_url '/api;driver=rackspace/realms'
  (last_xml_response/'realms/realm').length.should == 1
end
test_02_each_realm_has_a_name() click to toggle source
# File tests/drivers/rackspace/realms_test.rb, line 18
def test_02_each_realm_has_a_name
  get_auth_url '/api;driver=rackspace/realms'
  (last_xml_response/'realms/realm').each do |profile|
    (profile/'name').text.should_not == nil
    (profile/'name').text.should_not == ''
    (profile/'name').text.should == 'United States'
  end
end
test_03_it_returns_single_realm() click to toggle source
# File tests/drivers/rackspace/realms_test.rb, line 27
def test_03_it_returns_single_realm
  get_auth_url '/api;driver=rackspace/realms/us'
  (last_xml_response/'realm').first[:id].should == 'us'
  (last_xml_response/'realm/name').first.text.should == 'United States'
  (last_xml_response/'realm/state').first.text.should == 'AVAILABLE'
  (last_xml_response/'realm/limit').first.text.should == ''
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.