Sha256: 3bea18792349dba4a67426d9571286442ad9c78bfde68a52380549812d406e0f

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

require 'spec_helper'

describe TedApi::Client do
  it 'should instantiate with api key' do
    proc {
      TedApi::Client.new(api_key: 'foo')
    }.should_not raise_exception
  end

  describe "api_endpoint" do
    after(:each) do
      TedApi.reset
    end

    it "should default to https://api.ted.com/" do
      client = TedApi::Client.new
      client.api_endpoint.should == 'https://api.ted.com/'
    end

    it "should be set " do
      TedApi.api_endpoint = 'http://foo.dev'
      client = TedApi::Client.new
      client.api_endpoint.should == 'http://foo.dev/'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ted_api-0.1 spec/ted_api/client_spec.rb