Sha256: 235d3456f9adf252494d1048c1dcd77125787bcc5365574f98babeede9b74c23
Contents?: true
Size: 1.08 KB
Versions: 15
Compression:
Stored size: 1.08 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class TweetBlockerTest < Test::Unit::TestCase include Twitterland context "Getting TweetBlocker info" do should "get grade results" do stub_get 'http://tweetblocker.com:80/api/username/bradleyjoyce.json', 'tweet_blocker_grade.json' Twitterland::TweetBlocker.user("bradleyjoyce").score.should == 100 Twitterland::TweetBlocker.user("bradleyjoyce").grade.should == 'a' Twitterland::TweetBlocker.user("bradleyjoyce").username.should =="Bradley Joyce" end should "report user as spammer" do stub_get 'http://tweetblocker.com:80/api/spam/test.json', 'tweet_blocker_spam.json' Twitterland::TweetBlocker.report_spam("test").status.should == "user reported as spam" end should "get rate limit status" do stub_get 'http://tweetblocker.com:80/api/user/rate_limit_status.json', 'tweet_blocker_rate_limit_status.json' Twitterland::TweetBlocker.rate_limit.reset_time_in_seconds.should == 2885 Twitterland::TweetBlocker.rate_limit.remaining_hits.should == 98 end end end
Version data entries
15 entries across 15 versions & 2 rubygems