Permalink
Browse files

Rename #datetime to #created_at.

  • Loading branch information...
1 parent 41aa177 commit d5c0b2e32e740a9d61432f249db08c89c399743c @kevintuhumury kevintuhumury committed Mar 19, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/cameraplus/page.rb
  2. +2 −2 spec/cameraplus/page_spec.rb
View
@@ -1,7 +1,7 @@
module Cameraplus
class Page
- attr_reader :url, :timestamp, :location, :location_name, :tweet_text, :tweet_id, :view_count, :comment_count, :photos
+ attr_reader :url, :created_at, :location, :location_name, :tweet_text, :tweet_id, :view_count, :comment_count, :photos
def initialize(data)
@data = data
@@ -17,7 +17,7 @@ def parse
def parse_page
@url = @data.url
- @timestamp = DateTime.parse(@data.timestamp)
+ @created_at = DateTime.parse(@data.timestamp)
@location = @data.location
@location_name = @data.locationname
@tweet_text = @data.tweettext
@@ -35,8 +35,8 @@
subject.url.should eq "http://campl.us/iao4"
end
- it "has a timestamp" do
- subject.timestamp.should eq DateTime.parse("2012-03-14 22:53:49")
+ it "has a created at datetime" do
+ subject.created_at.should eq DateTime.parse("2012-03-14 22:53:49")
end
it "has a location" do

0 comments on commit d5c0b2e

Please sign in to comment.