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