Sha256: 32d73e9b8e0e7b3f2bafc0d201eb8e87253e8bd5d8b63eba004e689c3338f853

Contents?: true

Size: 983 Bytes

Versions: 95

Compression:

Stored size: 983 Bytes

Contents

Shindo.tests('Local | storage') do

  pending if Fog.mocking?

  before do
    @options = { :local_root => "~/.fog" }
  end

  tests('#endpoint') do
    tests('when no endpoint is provided').
      returns(nil) do
        Fog::Storage::Local.new(@options).endpoint
      end

    tests('when no host is provided').
      returns(nil) do
        @options[:scheme] = 'http'
        @options[:path] = '/files'
        @options[:port] = 80

        Fog::Storage::Local.new(@options).endpoint
      end

    tests('when endpoint is provided').
      returns('http://example.com/files') do
        @options[:endpoint] = 'http://example.com/files'

        Fog::Storage::Local.new(@options).endpoint
      end

    tests('when at least host option is provided').
      returns('http://example.com/files') do
        @options[:scheme] = 'http'
        @options[:host] = 'example.com'
        @options[:path] = '/files'

        Fog::Storage::Local.new(@options).endpoint
      end
  end
end

Version data entries

95 entries across 95 versions & 14 rubygems

Version Path
fog-maestrodev-1.15.0.20130829165835 tests/local/storage_tests.rb
fog-1.15.0 tests/local/storage_tests.rb
gapinc-fog-1.14.0 tests/local/storage_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/local/storage_tests.rb
fog-1.14.0 tests/local/storage_tests.rb
fog-1.13.0 tests/local/storage_tests.rb
gapinc-fog-1.12.1.2 tests/local/storage_tests.rb
gapinc-fog-1.12.1.1 tests/local/storage_tests.rb
gapinc-fog-1.12.1a tests/local/storage_tests.rb
gapinc-fog-1.12.1 tests/local/storage_tests.rb
fog-1.12.1 tests/local/storage_tests.rb
fog-1.12.0 tests/local/storage_tests.rb
hpfog-0.0.20 tests/local/storage_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/local/storage_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/local/storage_tests.rb
fog-nirvanix-1.8.2 tests/local/storage_tests.rb
fog-1.11.1 tests/local/storage_tests.rb
fog-1.11.0 tests/local/storage_tests.rb
fog-nirvanix-1.8.1 tests/local/storage_tests.rb
fog-1.10.1 tests/local/storage_tests.rb