summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Sepic2011-06-28 17:31:32 -0500
committerChris Sepic2011-06-28 17:31:32 -0500
commit6a658169b619dbece5e63a30a55ab67f571da60e (patch)
tree9b107abae2f902e28ba94688b2c25ffea0073223
parent0275dcdfb4fb7460b977e9e32bbcf115bbb6be22 (diff)
downloadevernote-6a658169b619dbece5e63a30a55ab67f571da60e.tar.bz2
fix two failing tests
-rw-r--r--lib/evernote/user_store.rb2
-rw-r--r--spec/evernote/user_store_spec.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/evernote/user_store.rb b/lib/evernote/user_store.rb
index 884ca24..152e267 100644
--- a/lib/evernote/user_store.rb
+++ b/lib/evernote/user_store.rb
@@ -12,7 +12,7 @@ module Evernote
credentials=credentials.inject({}) { |h,(k,v)| h[k.to_sym] = v; h } # convert any stringifyed hash keys into symbols
@consumer_key = credentials[:consumer_key]
- @consumer_secret = credentials[:consumer_key]
+ @consumer_secret = credentials[:consumer_secret]
@username = credentials[:username]
@password = credentials[:password]
diff --git a/spec/evernote/user_store_spec.rb b/spec/evernote/user_store_spec.rb
index 0b34645..174cc79 100644
--- a/spec/evernote/user_store_spec.rb
+++ b/spec/evernote/user_store_spec.rb
@@ -4,11 +4,11 @@ describe "Evernote::UserStore" do
before(:each) do
@user_store_url = "https://sandbox.evernote.com/edam/user"
@config = {
- :username => 'cgs',
- :password => 'password',
- :consumer_key => '12345',
- :consumer_secret => 'ABCDE'
- }
+ :username => 'cgs',
+ :password => 'password',
+ :consumer_key => '12345',
+ :consumer_secret => 'ABCDE'
+ }
end
it "initializes an Evernote::Client and validate the client code version" do
@@ -44,7 +44,7 @@ describe "Evernote::UserStore" do
it "should raise an exception if the config parameter is not a hash" do
not_a_hash="hello, I am a string"
- Evernote::UserStore.new(@user_store_url, not_a_hash).should raise_error(ArgumentError, "credentials must be passed in as a hash")
+ lambda {Evernote::UserStore.new(@user_store_url, not_a_hash)}.should raise_error(ArgumentError, "credentials must be passed in as a hash")
end
it "should wrap authentication failure" do