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.7.3 tests/helpers/compute/flavors_helper.rb
fog-aws-0.7.2 tests/helpers/compute/flavors_helper.rb
fog-google-0.0.7 tests/helpers/compute/flavors_helper.rb
fog-1.32.0 tests/helpers/compute/flavors_helper.rb
fog-ecloud-0.3.0 tests/helpers/compute/flavors_helper.rb
fog-google-0.0.6 tests/helpers/compute/flavors_helper.rb
fog-aws-0.6.0 tests/helpers/compute/flavors_helper.rb
fog-ecloud-0.2.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.5.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.4.1 tests/helpers/compute/flavors_helper.rb
fog-ecloud-0.1.3 tests/helpers/compute/flavors_helper.rb
fog-ecloud-0.1.2 tests/helpers/compute/flavors_helper.rb
fog-1.31.0 tests/helpers/compute/flavors_helper.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/helpers/compute/flavors_helper.rb
fog-aws-0.4.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.3.0 tests/helpers/compute/flavors_helper.rb
fog-aws-0.2.2 tests/helpers/compute/flavors_helper.rb
fog-aws-0.2.0 tests/helpers/compute/flavors_helper.rb
fog-1.30.0 tests/helpers/compute/flavors_helper.rb
fog-google-0.0.5 tests/helpers/compute/flavors_helper.rb