Permalink
Browse files

Clean up.

  • Loading branch information...
1 parent 2310f37 commit 48d94d3dfc769ba9daab8bbb80e13914e9518ebf @kevintuhumury kevintuhumury committed Mar 25, 2012
@@ -3,7 +3,7 @@ module API
class Page
def self.find(identifier, options = {})
- Request.call(uri(identifier), options)
+ Request.call uri(identifier), options
end
private
@@ -3,7 +3,7 @@ module API
class User
def self.find(identifier, options = {})
- Request.call(uri(identifier), options)
+ Request.call uri(identifier), options
end
private
@@ -34,7 +34,7 @@ def parse_metadata
end
def parse_user
- @user ||= Cameraplus::User.new(user: @data.page.tweet)
+ @user ||= Cameraplus::User.new user: @data.page.tweet
end
def parse_photos
@@ -1,4 +1,5 @@
class Hash
+
def method_missing(method, *args, &block)
if self.has_key? method
return self[method]
@@ -8,4 +9,5 @@ def method_missing(method, *args, &block)
super
end
end
+
end
@@ -4,7 +4,7 @@
use_vcr_cassette :page
- it "should be a Hash" do
+ it "should receive a Hash" do
response = Cameraplus::API::Page.find "b72Z"
response.should be_a Hash
end
@@ -4,7 +4,7 @@
use_vcr_cassette :user
- it "should be a hash" do
+ it "should receive a hash" do
response = Cameraplus::API::User.find "mostlylisa"
response.should be_a Hash
end
@@ -25,7 +25,7 @@
subject.url.should eq "http://www.facebook.com/profile.php?id=674215636"
end
- it "has a text" do
+ it "has text" do
subject.text.should eq "great shot!"
end
@@ -35,7 +35,7 @@
subject.url.should eq "http://campl.us/iao4"
end
- it "has a created at datetime" do
+ it "has a datetime at which it was created" do
subject.created_at.should eq DateTime.parse("2012-03-14 22:53:49")
end
View
@@ -1,7 +1,7 @@
require 'vcr'
VCR.configure do |c|
- c.ignore_localhost = true
+ c.ignore_localhost = true
c.cassette_library_dir = "spec/vcr_cassettes"
c.hook_into :webmock
end

0 comments on commit 48d94d3

Please sign in to comment.