Browse files

adding in minitest with vcr

  • Loading branch information...
1 parent 66e1bd2 commit b3fafeb4181db0a6b81f324af7a7f20766c17ed5 @cajun committed Jan 7, 2011
View
23 Gemfile.lock
@@ -11,29 +11,12 @@ GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.0)
- diff-lcs (1.1.2)
fakeweb (1.3.0)
- formatador (0.0.15)
- gestalt (0.0.11)
- formatador (>= 0.0.12)
i18n (0.4.1)
mime-types (1.16)
+ minitest (2.0.2)
rest-client (1.6.1)
mime-types (>= 1.16)
- rr (1.0.0)
- rspec (2.0.1)
- rspec-core (~> 2.0.1)
- rspec-expectations (~> 2.0.1)
- rspec-mocks (~> 2.0.1)
- rspec-core (2.0.1)
- rspec-expectations (2.0.1)
- diff-lcs (>= 1.1.2)
- rspec-mocks (2.0.1)
- rspec-core (~> 2.0.1)
- rspec-expectations (~> 2.0.1)
- shindo (0.1.6)
- formatador (>= 0.0.14)
- gestalt (>= 0.0.11)
vcr (1.2.0)
yajl-ruby (0.7.8)
@@ -45,10 +28,8 @@ DEPENDENCIES
bundler (>= 1.0.0)
fakeweb
i18n
+ minitest
rest-client
- rr
- rspec
- shindo
smile!
vcr
yajl-ruby (>= 0.7.8)
View
4 Rakefile
@@ -8,8 +8,6 @@ task :console do
sh "irb -rubygems -r ./lib/smile.rb"
end
-desc "Run Shindo rake tasks"
task :test do
- sh "shindo #{Dir.glob( 'test/**/*_test.rb' ).join(' ')}"
+ sh "ruby #{Dir.glob('./spec/*_spec.rb').join(' ')}"
end
-
View
4 smile.gemspec
@@ -22,9 +22,7 @@ Gem::Specification.new do |s|
s.add_dependency 'yajl-ruby', '>= 0.7.8'
s.add_development_dependency "bundler", ">= 1.0.0"
- s.add_development_dependency "shindo"
- s.add_development_dependency "rspec"
- s.add_development_dependency "rr"
+ s.add_development_dependency "minitest"
s.add_development_dependency "vcr"
s.add_development_dependency "fakeweb"
View
329 spec/fixtures/vcr_cassettes/checking_photos.yml
@@ -0,0 +1,329 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: http://api.smugmug.com:80/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "148"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 27.181:28236
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 4/4 - It's the product, stupid
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-encoding:
+ - gzip
+ vary:
+ - Accept-Encoding
+ content-length:
+ - "12478"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:49 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=4359e7680b45aced9be0b28674d8fd80; path=/; domain=.smugmug.com; HttpOnly
+ body: !binary |
+ H4sIAAAAAAAAA8Xda28Vx7rt8a9yxHmblXRd+/IOCJcTLptwMYSTo5YBYxti
+ DNjgwNb67rvbxazqs/2P1NJ+ni5paWmRkIyRNOunSc8e1f957ex8//zacO30
+ /bWfrp0cnB+dvpl+dHby5XD6z8/HJ/uHB2c/Hx6cT3/2/1z+4Nrwf//z2vH0
+ k4xxbRfbEN1P1+4dfJv+qk/H398+m37i9b9efTm5Nvz4acE2fXBx95Pu/H3j
+ 4NH0k549vj/96Oj8/OPw5y9//vL+r4PjDx8Pzg8+/7wLf3168ucvt/dPjv/6
+ 9ucvN48+H5+dn+yf/cs2pvnzl93fdrz8+/3vUmZMLf79o4ZyzE/Xbu5/PD8+
+ /TCF/Prk5jj9RWH6g7eP/zp4uH9ysPijP//26M78Z04/n1z+C08/vHtwfHg0
+ /dCG3l7+G7o4/fxm+nd8b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F9dnLnSNl3xiAeuIk4sp4uRyysbkYgkN
+ cjlInlzOIXJDE/Kn3E/+1/5GTXLnMmNqoUnuIgbIxfVZqLk+C7thy6L5OnLt
+ 4GQ/5WIVFXIpiMjF9Zlz3kTJk8Swjjy5lCJPLqZsTS6VUCEXgxTIxRwkN7aZ
+ 3MenN77EquROZcbUQpXcEgPk4vos1FyfBZuvZm6+llzpT7lURYVcCiJycX1m
+ W29ayWNtsI48uZQiTy6mbE0ulVAhF4MUyMUcIjfavsua3nj8seaLeC7LjKmF
+ JrmLGCAX12eh5vos7IYti+bryHXi5FIVFXIpiMjF9dn0ScPL3ligOvLkUoo8
+ uZiyNblUQoVcDFIgF3OQ3L4c3rh/cPH9Y1VypzJjaqFKbokBcnF9Fmquz0Ie
+ tpTm68j10u8+wyoq5FIQkYvrs+Ba6yTPWMA68uRSijy5mLI1uVRChVwMUiAX
+ c4jcNob8KffI379ddfA7lxlTC01yFzFALq7PQs31WcjDltJ8HblhcLLrM6yi
+ Qi4FAbkB12cxmN6J3ligOvLkUoo8uZiyNblUQoVcDFIgF3OI3M6Wwe8fe/u3
+ qg5+5zJjaqFJ7iIGyMX1Wai5Pgt52FKaryN3fjRXllyqokIuBRG5ho8o73vR
+ I8qxjjy5lCJPLqZsTS6VUCEXgxTIxRwkt2/yFOL0TuieViV3KjOmFqrklhgg
+ F9dnoeb6LORhS2m+jtx2aGSnEFhFhVwKInJxfRZ8aEVPEsM68uRSijy5mLI1
+ uVRChVwMUiAXc4jcPgS70/Tg68vvhzXJncuMqYUmuYsYIBfXZ6Hm+izkYUtp
+ vpZc4bdCYBUVcimIyMX1WehjF0Tv5VIdeXIpRZ5cTNmaXCqhQi4GKZCLOT/I
+ /X///i+/2alMhEEDAA==
+
+ http_version: "1.1"
View
86 spec/fixtures/vcr_cassettes/getting_albums_for_a_nickname.yml
@@ -0,0 +1,86 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: http://api.smugmug.com:80/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "136"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 162.8:15914
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 3/4 - Be different
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-encoding:
+ - gzip
+ vary:
+ - Accept-Encoding
+ content-length:
+ - "1563"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:51 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=4359e7680b45aced9be0b28674d8fd80; path=/; domain=.smugmug.com; HttpOnly
+ body: !binary |
+ H4sIAAAAAAAAA7WY21biSBSGX6WGm7kBVx1TSe4AD9222rTa3aMzc1FKCVGS
+ MElhD/Ty3WcXSEgloDjSLlwuSAH7cx/+f+dnIzfKNMJG+tBoNmJthmkfnuXx
+ ZACPPTW6mcT53kAbuNqeP2mEf/5sRHCICIoDwbxm45OewnuO/u3oHhzrpXlk
+ ojRphEw0G5eRGWm42h1mUW5ilSOKCYZj+zq/zaLx4mQDXjhRufk67iujbQT2
+ VIvQFvUQ8ULqhSKAMx9jNdDddJIY+/2s2ejC8UGawfcvggqajTMV2y88VHE0
+ mjaemo0P0WA4gl+zPISfnppLBkx97PlLhuvJdfbBZeDrGHrRbb49AyGI4JD4
+ IZYVBkbqCFwWDN1hNOpnOnmNgntMSMKWFJ/i7njmUtAVxWli9tDHvto2ftIi
+ DGHfxi9YJX4Z1ONnrIj/m7pV8w9/JX7mMR9zsoz/+x+UX7vx41X8PW0ig461
+ SpqofV6j+K71g076SBm0OrkeDQctLG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W3TT/yDypU9ZsaH02NfoxM0bc9wx
+ OlBmna2xl2CjBM4EytZE8SYkbmc1GGUewGJX7TK+IyQZ8GJxuTq5ebxzkUqe
+ 4ABChIDXSuXzteeF+RUeGoS8KpycvvsGDGRH+qvtuNvOryv5KUn/RXpnbkB7
+ aiRz93apVbwRAnuIgEsLQlHbhf332zQJGJ4o9F+cnYq2Q1GSfz3vCDAV6DLT
+ etvhvSDwrFWu3wjDOykrhn1YXYqyYvw4cRhKDuAKVnnUHWmVrOuVDQjUSqfd
+ hANwYb9go5eUEyYLDzOGceouwl7Zg40edW7WzObCIEPQcgMJabG5k+GwRdZ6
+ wtuFI7ZbJF/1eD7g/pl7Q6y0uiiIPY/XjqxTlUXabvzFmZd4sACjWs0Mfn+P
+ A4z0ivvE95Tlri8oSSdov92K0elk67paRC9guq4RkV2s8x4u9GN4/3jrOnvu
+ ykeUI/hQ/Rv8rEsIpGKh9X01zV/hIQx2rl+jIAA1v735LIpfpt/+cIduCQod
+ WS9Wg/logCWdZAur9iIKX6/v75tafz/9B3sxj/K7GAAA
+
+ http_version: "1.1"
View
134 spec/fixtures/vcr_cassettes/login_anonymously.yml
@@ -0,0 +1,134 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: https://api.smugmug.com:443/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "72"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 27.186:22956
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 2/4 - Love your employees
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-length:
+ - "112"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:48 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=67e9f720c88c76c1ac9c103daa355540; path=/; domain=.smugmug.com; HttpOnly
+ - SMSESS=4359e7680b45aced9be0b28674d8fd80; path=/; domain=.smugmug.com; HttpOnly
+ - _ss=c%2FE%2Faa%2BlkIg1s861iHWk4yZxpEW0Wp0GtkoBDQfVa6Yg4e3xxzpPPg%3D%3D; expires=Sat, 08-Jan-2011 12:56:48 GMT; path=/; domain=.smugmug.com
+ - _ss=GobjZuyrq2qe%2B6u7sdhbsMDBZaNso4LylrJLGYl6OSWwuVytQut%2BEg%3D%3D; expires=Sat, 08-Jan-2011 12:56:48 GMT; path=/; domain=.smugmug.com
+ body: "{\"stat\":\"ok\",\"method\":\"smugmug.login.anonymously\",\"Login\":{\"Session\":{\"id\":\"4359e7680b45aced9be0b28674d8fd80\"}}}"
+ http_version: "1.1"
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: http://api.smugmug.com:80/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "136"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 162.6:19454
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 2/4 - Love your employees
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-encoding:
+ - gzip
+ vary:
+ - Accept-Encoding
+ content-length:
+ - "1563"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:49 GMT
+ connection:
+ - keep-alive
+ set-cookie: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Rv8rEsIpGKh9X01zV/hIQx2rl+jIAA1v735LIpfpt/+cIduCQod
+ WS9Wg/logCWdZAur9iIKX6/v75tafz/9B3sxj/K7GAAA
+
+ http_version: "1.1"
View
49 spec/fixtures/vcr_cassettes/login_with_bad_password.yml
@@ -0,0 +1,49 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: https://api.smugmug.com:443/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "164"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 27.186:22952
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 2/4 - Love your employees
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-length:
+ - "50"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:51 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=de809d7c732a112111629120b7d34ef8; path=/; domain=.smugmug.com; HttpOnly
+ - SMSESS=e3834054563fe04a83c5812dd693f9ce; path=/; domain=.smugmug.com; HttpOnly
+ - _ss=mvJflqUwP4fcdK%2FsSdHtUC8RrVd3IC0%2B%2BWrVGHSVwR9KmuWYIFRDcw%3D%3D; expires=Sat, 08-Jan-2011 12:56:51 GMT; path=/; domain=.smugmug.com
+ - _ss=6QheJheD6%2BDPftqB5I3c8%2FpDHgrNEHXCmI%2FaW0QyzBCcHByiItk5bQ%3D%3D; expires=Sat, 08-Jan-2011 12:56:51 GMT; path=/; domain=.smugmug.com
+ body: "{\"stat\":\"fail\",\"code\":1,\"message\":\"invalid login\"}"
+ http_version: "1.1"
View
65 spec/fixtures/vcr_cassettes/login_with_good_password.yml
@@ -0,0 +1,65 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: https://api.smugmug.com:443/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "166"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 27.180:23896
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 1/4 - Thrill your customers
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-encoding:
+ - gzip
+ vary:
+ - Accept-Encoding
+ content-length:
+ - "250"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:52 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=92cf26c2488ee5f9cbc4a761327e15c6; path=/; domain=.smugmug.com; HttpOnly
+ - SMSESS=a24eefff2ecfd6dcd1396a90ac338f89; path=/; domain=.smugmug.com; HttpOnly
+ - _ss=GnodObjUOyx9lHmCwX8kEEllHcYFpKqO6nKkvsTLxyEacHLH6V7tzQ%3D%3D; expires=Sat, 08-Jan-2011 12:56:52 GMT; path=/; domain=.smugmug.com
+ - snapp=372464; expires=Sun, 06-Feb-2011 11:56:52 GMT; path=/; domain=.smugmug.com; httponly
+ - shott=%241%24yGSH%2FHv9%246RptuGGD.PhcsLY14IPnw%2F; expires=Sun, 06-Feb-2011 11:56:52 GMT; path=/; domain=.smugmug.com; httponly
+ - SMSESS=33c05438770a1cd332ca1abeefaf351f; path=/; domain=.smugmug.com; HttpOnly
+ - _ss=frXj3XDzIuZ2le0AzkDDNUcQD7Nfxx%2FGoujvz%2BYTD7HIT4NxNoabJw%3D%3D; expires=Sat, 08-Jan-2011 12:56:52 GMT; path=/; domain=.smugmug.com
+ - _su=e7001a587a3c6d225ff701808b59c1b3; expires=Sun, 06-Feb-2011 11:56:52 GMT; path=/; domain=.smugmug.com; secure; httponly
+ - _ss=auH8ldJ%2BauI%2FAq1S47MPf9XYSH15grCsnqnKozoRyfNej3Ab117j1w%3D%3D; expires=Sat, 08-Jan-2011 12:56:52 GMT; path=/; domain=.smugmug.com
+ body: !binary |
+ H4sIAAAAAAAAA2VPXU+DQBD8LxseSQWOj9o3Y0UTsWmCGmN82R5HOTk4wh6p
+ teG/uzz0yWSTzc7MTmYuQA4dbMC24EOnXGMrvqibjjwrY4+6X520a/ZIdLJj
+ xapiAWFzgTdS47I1v4gsitPYh52W7Q47xSatUboflGORD1tNg8Hzf2r24er9
+ hNQw6YXe7dfNj9u296V3SL8/hvzhM08e46B5oagYnylgwzsp7dS71/OwGO5H
+ y1iujSr1ryp0p7lUlIRpso44Vcll3nEyDNZoSDGiiLTtr/FBCBkksVhnWYCh
+ rISIJIZ4UKrGWiRhDfM8/wFClQouLQEAAA==
+
+ http_version: "1.1"
View
56 spec/fixtures/vcr_cassettes/reloading_album.yml
@@ -0,0 +1,56 @@
+---
+- !ruby/struct:VCR::HTTPInteraction
+ request: !ruby/struct:VCR::Request
+ method: :post
+ uri: http://api.smugmug.com:80/hack/json/1.2.0/
+ body:
+ headers:
+ accept:
+ - "*/*; q=0.5, application/xml"
+ accept-encoding:
+ - gzip, deflate
+ content-length:
+ - "129"
+ content-type:
+ - application/x-www-form-urlencoded
+ user-agent:
+ - Ruby
+ response: !ruby/struct:VCR::Response
+ status: !ruby/struct:VCR::ResponseStatus
+ code: 200
+ message: OK
+ headers:
+ server:
+ - Apache
+ x-s:
+ - 27.186:22968
+ x-powered-by:
+ - SmugMug/0.9
+ x-smugmug-hiring:
+ - "How to love what you do: http://www.smugmug.com/jobs/"
+ x-smugmug-values:
+ - 3/4 - Be different
+ cache-control:
+ - private, max-age=1, must-revalidate
+ content-encoding:
+ - gzip
+ vary:
+ - Accept-Encoding
+ content-length:
+ - "206"
+ content-type:
+ - application/json
+ date:
+ - Fri, 07 Jan 2011 11:56:50 GMT
+ connection:
+ - keep-alive
+ set-cookie:
+ - SMSESS=4359e7680b45aced9be0b28674d8fd80; path=/; domain=.smugmug.com; HttpOnly
+ body: !binary |
+ H4sIAAAAAAAAA12OzQrCMAyAX2Xk3I2uY4P1phN06EFQH6DT2hXXdawZKLJ3
+ N0O8CMkhX778vCGgQpDgH8DAaWz9jargJkORqK6ZXEiMxrq/ezJWCwD5Bkta
+ mgte5lnBYK9fNLV9rvWRpKMPFq3vQWY5g7PFTlO3akcb0KkQCZ5y0jY6XEc7
+ fE0gcFABL8NNoV5+WKw4FbEoorSQopB5SU7tlNGVn3pc7mcMdta0HSX+vuIz
+ g4p2GD++fqwkdpqaf8znef4A9/SSmAIBAAA=
+
+ http_version: "1.1"
View
69 spec/smile_spec.rb
@@ -0,0 +1,69 @@
+require File.dirname(__FILE__) + '/spec_helper'
+
+describe Smile do
+ before(:each) do
+ VCR.use_cassette 'login anonymously', :record => :new_episodes do
+ # this resets the config to the base state before every test
+ Smile::Base.clear_config!
+ Smile::Base.configure do |config|
+ config.logger_on = false
+ end
+ @smug = Smile.auth_anonymously
+ @album = @smug.albums(:nick_name => 'kleinpeter').first
+ end
+ end
+
+ describe 'should have security' do
+ describe 'using valid logins' do
+
+ it 'should be able to login anonymously' do
+ VCR.use_cassette 'login anonymously', :record => :new_episodes do
+ Smile.auth_anonymously.must_be_instance_of Smile::Smug
+ end
+ end
+
+ it 'should be able to login with a valid account' do
+ VCR.use_cassette 'login with good password', :record => :new_episodes do
+ Smile.auth( 'foo@example.com', 'seaKrat' ).must_be_instance_of Smile::Smug
+ end
+ end
+
+ end
+
+ describe 'using invalid logins' do
+
+ it 'should NOT able to login without a valid account' do
+ VCR.use_cassette 'login with bad password', :record => :new_episodes do
+ lambda { Smile.auth( 'bar@example.com', 'seaKrat' ) }.must_raise( Smile::Exception )
+ end
+ end
+ end
+
+ end
+
+ describe 'albums' do
+ it 'should have albums on an nickname account' do
+ VCR.use_cassette 'getting albums for a nickname', :record => :new_episodes do
+ @smug.albums( :nick_name => 'kleinpeter' ).wont_be_empty
+ end
+ end
+
+ describe 'have methods' do
+ it 'should be able to be reloaded' do
+ VCR.use_cassette 'reloading album', :record => :new_episodes do
+ old_title = @album.title
+ @album.title = 'foo'
+ @album.reload!
+ @album.title.must_equal old_title
+ end
+ end
+
+ it 'should have photos' do
+ VCR.use_cassette 'checking photos', :record => :new_episodes do
+ @album.photos.wont_be_empty
+ end
+ end
+
+ end
+ end
+end
View
17 spec/spec_helper.rb
@@ -0,0 +1,17 @@
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+
+require 'rubygems'
+require 'bundler/setup'
+require 'minitest/autorun'
+require 'minitest/spec'
+require 'smile'
+require 'vcr'
+
+
+VCR.config do |c|
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
+ c.http_stubbing_library = :fakeweb # or :webmock
+end
+
+MiniTest::Unit.autorun

0 comments on commit b3fafeb

Please sign in to comment.