Sha256: 0064507dc99c1a0c6e587631b9a1286806ac306d7ca2df6e60f580270f7497e9

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class NoAuthTest < Test::Unit::TestCase
  context "Client methods" do
    setup do
      @twitter = Twitter::NoAuth.new
    end

    should "be able to get" do
      stub_get('http://twitter.com:80/users/show/mike.json', 'user.json')
      response = @twitter.get('/users/show/mike.json')
      response.should == fixture_file('user.json')
    end

    should "be able to get with headers" do
      @twitter.class.expects(:get).with(
        '/users/show/mike.json', {
          :headers => {'Foo' => 'Bar'}
        }
      ).returns(fixture_file('user.json'))
      @twitter.get('/users/show/mike.json', {'Foo' => 'Bar'})
    end
    
  end  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
szimek-twitter-0.6.4 test/twitter/no_auth_test.rb
szimek-twitter-0.6.5 test/twitter/no_auth_test.rb