Sha256: 1db3de8125285ec64bfd6a1a10c4d19f4199af82c7c4ba8ce1a425a88123d38b

Contents?: true

Size: 716 Bytes

Versions: 6

Compression:

Stored size: 716 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Evernote::Client" do
  it "initializes a ThriftClient instance that uses HTTP transport" do
    klass = mock("SomeInternalEvernoteClass")
    opts = { :transport => Thrift::HTTPClientTransport }
    ThriftClient.should_receive(:new).with(klass, "https://www.example.com", opts)
    
    Evernote::Client.new(klass, "https://www.example.com")
  end
  
  it "should proxy methods" do
    thrift_client = mock("ThriftClient")
    ThriftClient.stub!(:new => thrift_client)
    thrift_client.should_receive(:foobar)

    client = Evernote::Client.new(mock("SomeInternalEvernoteClass"), "https://www.example.com")
    client.foobar
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
evernote-1.2.1 spec/evernote/client_spec.rb
evernote-1.2.0 spec/evernote/client_spec.rb
evernote-1.1.0 spec/evernote/client_spec.rb
evernote-1.0.0 spec/evernote/client_spec.rb
evernote-0.9.0 spec/evernote/client_spec.rb
evernote-0.8.0 spec/evernote/client_spec.rb