Sha256: 16b79f341f19d7b88776bd2cf0a3396b27bbdc2436b8306404ef85febae6f672

Contents?: true

Size: 819 Bytes

Versions: 182

Compression:

Stored size: 819 Bytes

Contents

def flavors_tests(connection, params = {}, mocks_implemented = true)
  tests('success') do

    tests("#all").succeeds do
      pending if Fog.mocking? && !mocks_implemented
      connection.flavors.all
    end

    if !Fog.mocking? || mocks_implemented
      @identity = connection.flavors.first.identity
    end

    tests("#get('#{@identity}')").succeeds do
      pending if Fog.mocking? && !mocks_implemented
      connection.flavors.get(@identity)
    end

  end

  tests('failure') do

    if !Fog.mocking? || mocks_implemented
      invalid_flavor_identity = connection.flavors.first.identity.to_s.gsub(/\w/, '0')
    end

    tests("#get('#{invalid_flavor_identity}')").returns(nil) do
      pending if Fog.mocking? && !mocks_implemented
      connection.flavors.get(invalid_flavor_identity)
    end

  end
end

Version data entries

182 entries across 149 versions & 16 rubygems

Version Path
fog-aws-0.9.4 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.7 tests/helpers/compute/flavors_helper.rb
fog-vcloud-director-0.1.1 tests/helpers/compute/flavors_helper.rb
fog-vcloud-director-0.1.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.9.3 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.6 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.5 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.4 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.3 tests/helpers/compute/flavors_helper.rb
fog-1.38.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.9.2 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.2 tests/helpers/compute/flavors_helper.rb
fog-aws-0.9.1 tests/helpers/compute/flavors_helper.rb
fog-aws-0.9.0 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.1 tests/helpers/compute/flavors_helper.rb
fog-openstack-0.1.0 tests/helpers/compute/flavors_helper.rb
fog-rackspace-0.1.1 tests/helpers/compute/flavors_helper.rb
fog-rackspace-0.1.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.8.1 tests/helpers/compute/flavors_helper.rb
fog-aws-0.8.0 tests/helpers/compute/flavors_helper.rb