Sha256: beb898d696c1c4ba6983deb17a4bb8860868d45cb1786fe2c196c863dadebb08
Contents?: true
Size: 1.72 KB
Versions: 1
Compression:
Stored size: 1.72 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class FollerMeTest < Test::Unit::TestCase include Twitterland context "When hitting the API" do should "should display all terms for a user" do stub_get('http://api.foller.me/pengwynn/all.json', 'foller_me_all.json') result = Twitterland::FollerMe.terms('pengwynn') result.topics.keys.size.should == 818 result.topics.firefox.popularity.should == 2 end should "should allow options" do stub_get('http://api.foller.me/pengwynn/all.json?font_max=40&exclude=ruby%2Crails&font_min=20', 'foller_me_all.json') result = Twitterland::FollerMe.terms('pengwynn', {:exclude => 'ruby,rails', :font_min => 20, :font_max => 40}) result.should_not == nil end should "should display topics for a user" do stub_get('http://api.foller.me/pengwynn/topics.json', 'foller_me_topics.json') result = Twitterland::FollerMe.topics('pengwynn') result.topics.keys.size.should == 818 result.topics.firefox.popularity.should == 2 end should "should display mentions for a user" do stub_get('http://api.foller.me/pengwynn/mentions.json', 'foller_me_mentions.json') result = Twitterland::FollerMe.mentions('pengwynn') result.mentions.keys.size.should == 103 result.mentions.keys.first.should == '@wdperson' result.mentions.values.first.popularity.should == 1 end should "should display hashtags for a user" do stub_get('http://api.foller.me/pengwynn/hashtags.json', 'foller_me_hashtags.json') result = Twitterland::FollerMe.hashtags('pengwynn') result.hashtags.keys.size.should == 25 result.hashtags['#typos'].popularity.should == 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twitterland-0.4.6 | test/twitterland/foller_me_test.rb |