Sha256: 914f31f9b007964e5ef7636a3d989584ec795e9ad738d01e48150ec2bde2462e

Contents?: true

Size: 937 Bytes

Versions: 4

Compression:

Stored size: 937 Bytes

Contents

Shindo.tests('Fog::Compute[:opennebula] | group model', ['opennebula']) do
  begin
    groups = Fog::Compute[:opennebula].groups
  rescue Fog::Errors::LoadError
    pending
  end
  group = groups.last

  tests('The group model should') do
    tests('have the action') do
      test('reload') { group.respond_to? 'reload' }
    end
    tests('have attributes') do
      model_attribute_hash = group.attributes
      attributes = 
      tests("The group model should respond to") do
        [:name, :id, :to_label].each do |attribute|
          test("#{attribute}") { group.respond_to? attribute }
        end
      end
      tests("The attributes hash should have key") do
        [:name, :id].each do |attribute|
          test("#{attribute}") { model_attribute_hash.has_key? attribute }
        end
      end
    end
    test('be a kind of Fog::Compute::OpenNebula::Group') { group.kind_of? Fog::Compute::OpenNebula::Group }
  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-2.3.0 tests/opennebula/models/compute/group_tests.rb
fog-ifeel-2.2.0 tests/opennebula/models/compute/group_tests.rb
fog-2.2.0 tests/opennebula/models/compute/group_tests.rb
fog-2.1.0 tests/opennebula/models/compute/group_tests.rb