Sha256: 7e668a7d15e6704ca031a82b2dc7a50656c70d964f12646eafe7a7912d84bdf2
Contents?: true
Size: 747 Bytes
Versions: 1
Compression:
Stored size: 747 Bytes
Contents
require 'retweet' require 'base_test' # the test for testing retweet functionality class TestRetweet < BaseTest # setup the test def setup super @id = 12355936428 @retweet = Retweet.new(@auth) stub_request(:post, "http://#{@auth[:username]}:#{@auth[:password]}@api.twitter.com/1/statuses/retweet/#{@id}.json").to_return(:body => 'content') end # teardown the test # nil all instance variables def teardown @id, @retweet = nil end # retweet def test_retweet # no permission to access web! WebMock.disable_net_connect! # retweet the given id response = @retweet.retweet(@id) # assertion assert_not_nil(response) assert_equal('content',response.body) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
streambot-0.2.5 | test/test_retweet.rb |