Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wynn Netherland committed Oct 30, 2009
1 parent b9ee178 commit f6a77fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/twitter/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ class BaseTest < Test::Unit::TestCase
hashes.should == @twitter.friends_timeline.map{ |s| s.hash }
end
end

end
end
8 changes: 4 additions & 4 deletions test/twitter/trends_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ class TrendsTest < Test::Unit::TestCase
stub_get 'http://search.twitter.com:80/trends/daily.json?exclude=hashtags', 'trends_daily_exclude.json'
trends = Trends.daily(:exclude => 'hashtags')
trends.size.should == 480
trends[0].name.should == 'Star Trek'
trends[0].query.should == %Q(\"Star Trek\")
trends[0].name.should == 'Kobe'
trends[0].query.should == %Q(Kobe)
end

should "be able to get for specific date (with date string)" do
stub_get 'http://search.twitter.com:80/trends/daily.json?date=2009-05-01', 'trends_daily_date.json'
trends = Trends.daily(:date => '2009-05-01')
trends.size.should == 440
trends[0].name.should == 'Swine Flu'
trends[0].query.should == %Q(\"Swine Flu\")
trends[0].query.should == %Q(\"Swine Flu\" OR Flu)
end

should "be able to get for specific date (with date object)" do
stub_get 'http://search.twitter.com:80/trends/daily.json?date=2009-05-01', 'trends_daily_date.json'
trends = Trends.daily(:date => Date.new(2009, 5, 1))
trends.size.should == 440
trends[0].name.should == 'Swine Flu'
trends[0].query.should == %Q(\"Swine Flu\")
trends[0].query.should == %Q(\"Swine Flu\" OR Flu)
end
end

Expand Down

0 comments on commit f6a77fd

Please sign in to comment.