Sha256: d95ad0bf2e37d39080d4d092f5594f75819a1868c28ad58a7850d41ff81d4221

Contents?: true

Size: 904 Bytes

Versions: 9

Compression:

Stored size: 904 Bytes

Contents

require File.expand_path(File.join(__FILE__, '../..', 'test_helper'))
require 'rubber/cloud/aws'
require 'ostruct'

class FogTest < Test::Unit::TestCase

  context "fog" do

    setup do
      env = {'credentials' =>
                 {'rackspace_api_key' => "XXX", 'rackspace_username' => "YYY", 'provider' => "rackspace"}}
      env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
      @cloud = Rubber::Cloud::Fog.new(env, nil)
    end

    should "instantiate" do
      assert @cloud.compute_provider
      assert @cloud.storage_provider
    end

    should "provide storage" do
      assert_raises(Fog::Errors::MockNotImplemented) { @cloud.storage('mybucket') }
    end

    should "not provide table store" do
      assert_raises { @cloud.table_store('somekey') }
    end

    should "create instance" do
      assert @cloud.create_instance('', '', '', '')
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubber-2.3.1 test/cloud/fog_test.rb
rubber-2.3.0 test/cloud/fog_test.rb
rubber-2.2.4 test/cloud/fog_test.rb
rubber-2.2.3 test/cloud/fog_test.rb
rubber-2.2.2 test/cloud/fog_test.rb
rubber-2.2.1 test/cloud/fog_test.rb
rubber-2.2.0 test/cloud/fog_test.rb
rubber-2.1.2 test/cloud/fog_test.rb
rubber-2.1.1 test/cloud/fog_test.rb