<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,9 @@ class WaseEndpoint
       twitter_http_auth = Twitter::HTTPAuth.new(username, password)
       @twitter_client = Twitter::Base.new(twitter_http_auth)
       
+      # Call the test api method to validate the authentication.
+      @twitter_client.help
+      
       # The oldest message ID could be stored here, but since twitter IDs
       # aren't always time-linear, comparing the messages is safer.
       @all_messages = []</diff>
      <filename>lib/wase_endpoint/twitterer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,16 @@ describe WaseEndpoint::Twitterer do
     WaseEndpoint::Twitterer.new(username, password)
   end
   
+  it &quot;should validate the authentication with the help method&quot; do
+    username ='foo'
+    password = 'bar'
+    Twitter::HTTPAuth.stub(:new)
+    Twitter::Base.stub(:new).and_return(mock_twitter_base)
+    mock_twitter_base.should_receive(:help)
+
+    @twitterer = WaseEndpoint::Twitterer.new(username, password)
+  end
+  
   describe &quot;fetching messages&quot; do
     
     before(:all) do
@@ -72,8 +82,8 @@ describe WaseEndpoint::Twitterer do
     @auth_mock ||= mock(Twitter::HTTPAuth)
   end
   
-  def mock_twitter_base
-    @base_mock ||= mock(Twitter::Base)
+  def mock_twitter_base(stubs = {:help =&gt; true})
+    @base_mock ||= mock(Twitter::Base, stubs)
   end
   
   def mock_mash(message_id)</diff>
      <filename>spec/wase_endpoint_twitterer_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7694df3bbf63d06cac544cd445faa5b7714fbb6e</id>
    </parent>
  </parents>
  <author>
    <name>Douglas F Shearer</name>
    <email>dougal.s@gmail.com</email>
  </author>
  <url>http://github.com/dougal/wase_endpoint/commit/22649ac71c9a6ce271de38e3f6a9c25135ca3df8</url>
  <id>22649ac71c9a6ce271de38e3f6a9c25135ca3df8</id>
  <committed-date>2009-11-05T13:19:49-08:00</committed-date>
  <authored-date>2009-11-05T13:19:49-08:00</authored-date>
  <message>A new Twitterer object now makes a test call to twitter to validate the authentication.</message>
  <tree>11f2f6a021eff30d2057962f2f742f6bc9690d3f</tree>
  <committer>
    <name>Douglas F Shearer</name>
    <email>dougal.s@gmail.com</email>
  </committer>
</commit>
