diff options
| author | Chris Sepic | 2010-02-21 14:08:14 -0600 |
|---|---|---|
| committer | Chris Sepic | 2010-02-21 14:08:14 -0600 |
| commit | 56d612120451c490fce4b006650c067498ed1678 (patch) | |
| tree | e8f6fd67adfeaf0c7632e4320a668f6d65a198a0 /spec | |
| parent | a1a0fa8e6584b1bef742c8ec8fd4797246ef051b (diff) | |
| download | evernote-56d612120451c490fce4b006650c067498ed1678.tar.bz2 | |
Evernote::Client will never be used directly
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/evernote/client_spec.rb | 9 | ||||
| -rw-r--r-- | spec/evernote/user_store_spec.rb | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/spec/evernote/client_spec.rb b/spec/evernote/client_spec.rb index 2a75a74..5d3d08c 100644 --- a/spec/evernote/client_spec.rb +++ b/spec/evernote/client_spec.rb @@ -8,13 +8,4 @@ describe "Evernote::Client" do Evernote::Client.new(klass, "https://www.example.com") end - - it "delegates method calls to the underlying ThriftClient" do - client = Evernote::Client.new(Evernote::EDAM::UserStore::UserStore::Client, "https://www.example.com") - internal_client = client.instance_variable_get(:@client) - internal_client.stub(:checkVersion) - internal_client.should_receive(:checkVersion) - - client.checkVersion - end end diff --git a/spec/evernote/user_store_spec.rb b/spec/evernote/user_store_spec.rb index 6196ffe..7b0127e 100644 --- a/spec/evernote/user_store_spec.rb +++ b/spec/evernote/user_store_spec.rb @@ -7,14 +7,14 @@ describe "Evernote::UserStore" do end it "initializes an Evernote::Client and validate the client code version" do - client = mock("client", :checkVersion => true) + client = mock("Evernote::Client", :client => mock("ThriftClient", :checkVersion => true)) Evernote::Client.should_receive(:new).with(Evernote::EDAM::UserStore::UserStore::Client, "https://sandbox.evernote.com/edam/user", {}).and_return(client) Evernote::UserStore.new("https://sandbox.evernote.com/edam/user", @opts, @thrift_client_opts) end it "should raise an error on init if the version is not up to date" do - client = mock("client", :checkVersion => false) + client = mock("Evernote::Client", :client => mock("ThriftClient", :checkVersion => false)) Evernote::Client.should_receive(:new).with(Evernote::EDAM::UserStore::UserStore::Client, "https://sandbox.evernote.com/edam/user", {}).and_return(client) lambda { |
