Sha256: 778a40f4bb174c776e2b978e400ccc1d4da427ff0128be24e1f45a3071f5a507

Contents?: true

Size: 1.27 KB

Versions: 13

Compression:

Stored size: 1.27 KB

Contents

Shindo.tests('Fog::Compute[:xenserver] | PBD model', ['xenserver']) do

  pbds = Fog::Compute[:xenserver].pbds
  pbd = pbds.first

  tests('The PBD model should') do
    tests('have the action') do
      test('reload') { pbd.respond_to? 'reload' }
    end
    tests('have attributes') do
      model_attribute_hash = pbd.attributes
      attributes = [ 
        :reference,
        :uuid,
        :__host,
        :__sr
      ]
      tests("The PBD model should respond to") do
        attributes.each do |attribute|
          test("#{attribute}") { pbd.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 }
        end
      end
    end

    test('be a kind of Fog::Compute::XenServer::PBD') { pbd.kind_of? Fog::Compute::XenServer::PBD}

  end

  tests("A real PBD should") do
    tests("return valid host") do
      test("should be a Fog::Compute::XenServer::Host") { pbd.host.kind_of? Fog::Compute::XenServer::Host }
    end
    tests("return valid storage repository") do
      test("should be a Fog::Compute::XenServer::StorageRepository") { pbd.storage_repository.kind_of? Fog::Compute::XenServer::StorageRepository }
    end

  end

end

Version data entries

13 entries across 13 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 tests/xenserver/models/compute/pbd_tests.rb
fog-nirvanix-1.8.1 tests/xenserver/models/compute/pbd_tests.rb
fog-parser-fix-1.6.1 tests/xenserver/models/compute/pbd_tests.rb
fog-test-again-1.6.0 tests/xenserver/models/compute/pbd_tests.rb
fog-parser-fix-1.6.0 tests/xenserver/models/compute/pbd_tests.rb
fog-sgonyea-1.8.1 tests/xenserver/models/compute/pbd_tests.rb
fog-1.8.0 tests/xenserver/models/compute/pbd_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/xenserver/models/compute/pbd_tests.rb
fog-1.7.0 tests/xenserver/models/compute/pbd_tests.rb
fog-1.6.0 tests/xenserver/models/compute/pbd_tests.rb
fog-1.5.0 tests/xenserver/models/compute/pbd_tests.rb
rackspace-fog-1.4.2 tests/xenserver/models/compute/pbd_tests.rb
fog-1.4.0 tests/xenserver/models/compute/pbd_tests.rb