Sha256: 34418fe018c2965b5dd37e84a4a33344c5d3330e4de99cca90d230456dce0feb

Contents?: true

Size: 870 Bytes

Versions: 7

Compression:

Stored size: 870 Bytes

Contents

Shindo.tests("Fog::Ovirt::Compute.new | instance_type model", ["ovirt"]) do
  instance_types = Fog::Ovirt::Compute.new.instance_types
  instance_type = instance_types.last

  tests("The instance_type model should") do
    tests("have attributes") do
      model_attribute_hash = instance_type.attributes
      attributes = %i[id name memory sockets cores]

      tests("The instance type model should respond to") do
        attributes.each do |attribute|
          test(attribute.to_s) { instance_type.respond_to? attribute }
        end
      end
      tests("The attributes hash should have key") do
        attributes.each do |attribute|
          test(attribute.to_s) { model_attribute_hash.key? attribute }
        end
      end
    end
    test("be a kind of Fog::Ovirt::Compute::InstanceType") { instance_type.is_a? Fog::Ovirt::Compute::InstanceType }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-ovirt-2.0.2 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-2.0.1 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-2.0.0 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-1.2.5 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-1.2.4 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-1.2.3 tests/ovirt/models/compute/instance_type_tests.rb
fog-ovirt-1.2.2 tests/ovirt/models/compute/instance_type_tests.rb