Sha256: 8ee3569e539d000efaae4dcc787e890d286fbf9c1b235ff88fb793f78a890dc1
Contents?: true
Size: 755 Bytes
Versions: 6
Compression:
Stored size: 755 Bytes
Contents
require 'streambot/base_test' module StreamBot # test for http wrapper class class TestOAuth < StreamBot::BaseTest # setup def setup super WebMock.allow_net_connect! @oauth = StreamBot::OAuth.new(@params['oauth']) stub_request(:post,"http://api.twitter.com/statuses/update.json").to_return(:body=>"response") end def test_verify_credentials json = @oauth.get('/account/verify_credentials.json') assert_not_nil(json) end def test_post WebMock.disable_net_connect! json = @oauth.post('/statuses/update.json',{:status => 'test'}) assert_not_nil(json) assert_equal("response",json) end # nil all variables def teardown @oauth = nil end end end
Version data entries
6 entries across 6 versions & 1 rubygems