Sha256: 5a7bc850a8c81bd7d25e2a0bb98d8278e5202cf8f44546173ecc6e3ce56353cb

Contents?: true

Size: 533 Bytes

Versions: 26

Compression:

Stored size: 533 Bytes

Contents

require 'spec_helper'

describe CFoundry::Client do
  subject { CFoundry::Client.new('http://example.com') }

  it "returns a v1 client when used on a v1 target" do
    stub_request(:get, "http://example.com/info").to_return(:status => 200, :body => '{"version":1}')
    subject.should be_a(CFoundry::V1::Client)
  end

  it "returns a v2 client when used on a v2 target" do
    stub_request(:get, "http://example.com/info").to_return(:status => 200, :body => '{"version":2}')
    subject.should be_a(CFoundry::V2::Client)
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
static-1.0.3 vendor/cfoundry-0.5.2/spec/cfoundry/client_spec.rb
cfoundry-0.6.1.rc4 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc7 spec/cfoundry/client_spec.rb
static-1.0.1 vendor/cfoundry-0.5.2/spec/cfoundry/client_spec.rb
cfoundry-0.6.1.rc3 spec/cfoundry/client_spec.rb
cfoundry-0.6.1.rc2 spec/cfoundry/client_spec.rb
cfoundry-0.6.1.rc1 spec/cfoundry/client_spec.rb
cfoundry-0.6.0 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc6 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc5 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc6 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc4 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc3 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc2 spec/cfoundry/client_spec.rb
cfoundry-0.6.0.rc1 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc5 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc4 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc3 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc2 spec/cfoundry/client_spec.rb
cfoundry-0.5.3.rc1 spec/cfoundry/client_spec.rb