diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/evernote/client_spec.rb | 11 | ||||
| -rw-r--r-- | spec/evernote/user_store_spec.rb | 20 | ||||
| -rw-r--r-- | spec/evernote_spec.rb | 7 | 
3 files changed, 31 insertions, 7 deletions
| diff --git a/spec/evernote/client_spec.rb b/spec/evernote/client_spec.rb new file mode 100644 index 0000000..5d3d08c --- /dev/null +++ b/spec/evernote/client_spec.rb @@ -0,0 +1,11 @@ +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 +end diff --git a/spec/evernote/user_store_spec.rb b/spec/evernote/user_store_spec.rb new file mode 100644 index 0000000..fab5757 --- /dev/null +++ b/spec/evernote/user_store_spec.rb @@ -0,0 +1,20 @@ +require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') + +describe "Evernote::UserStore" do +  xit "initializes an Evernote::Client" do +    Evernote::Client.should_receive(:new).with(Evernote::EDAM::UserStore::UserStore::Client, "https://sandbox.evernote.com/edam/user") +     +    Evernote::UserStore.new("https://sandbox.evernote.com/edam/user") +  end +   +  xit "raises an exception if no consumer key is set" do +    Evernote::UserStore.new("https://sandbox.evernote.com/edam/user", {}) +  end +   +  # opts = { +  #   :consumer_key => "mykey", +  #   :consumer_secret => "abcdefg123456", +  #   :username => "username", +  #   :password => "password" +  # } +end diff --git a/spec/evernote_spec.rb b/spec/evernote_spec.rb deleted file mode 100644 index b51ed19..0000000 --- a/spec/evernote_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -require File.expand_path(File.dirname(__FILE__) + '/spec_helper') - -describe "Evernote" do -  it "fails" do -    fail "hey buddy, you should probably rename this file and start specing for real" -  end -end | 
