Sha256: b8d139b1f1cb3cf6b95d1d725e91c3ba1ae91461c563c006d40dcbb04f60dda8

Contents?: true

Size: 562 Bytes

Versions: 19

Compression:

Stored size: 562 Bytes

Contents

require "spec_helper"

describe ApiClient::Connection::Abstract do

  class ConnectionSubclass < ApiClient::Connection::Abstract
  end

  it "does not raise an error when instantiating a subclass" do
    lambda {
      ConnectionSubclass.new("http://google.com")
    }.should_not raise_error("Cannot instantiate abstract class")
  end

  it "raises an error when instantiating directly and not as a subclass" do
    lambda {
      ApiClient::Connection::Abstract.new("http://google.com")
    }.should raise_error("Cannot instantiate abstract class")
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
api_client-0.4.3 spec/api_client/connection/abstract_spec.rb
api_client-0.4.2 spec/api_client/connection/abstract_spec.rb
api_client-0.4.1 spec/api_client/connection/abstract_spec.rb
api_client-0.3.3 spec/api_client/connection/abstract_spec.rb
api_client-0.4.0 spec/api_client/connection/abstract_spec.rb
api_client-0.3.2 spec/api_client/connection/abstract_spec.rb
api_client-0.3.1 spec/api_client/connection/abstract_spec.rb
api_client-0.3.0 spec/api_client/connection/abstract_spec.rb
api_client-0.2.0 spec/api_client/connection/abstract_spec.rb
api_client-0.1.9 spec/api_client/connection/abstract_spec.rb
api_client-0.1.8 spec/api_client/connection/abstract_spec.rb
api_client-0.1.7 spec/api_client/connection/abstract_spec.rb
api_client-0.1.6 spec/api_client/connection/abstract_spec.rb
api_client-0.1.5 spec/api_client/connection/abstract_spec.rb
api_client-0.1.4 spec/api_client/connection/abstract_spec.rb
api_client-0.1.3 spec/api_client/connection/abstract_spec.rb
api_client-0.1.2 spec/api_client/connection/abstract_spec.rb
api_client-0.1.1 spec/api_client/connection/abstract_spec.rb
api_client-0.1.0 spec/api_client/connection/abstract_spec.rb