<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,16 @@
 require File.dirname(__FILE__) + '/../spec_helper'
 
 describe &quot;NikePlus::Profile&quot; do
+  before(:all) do
+    profile = REXML::Document.new(File.read(File.dirname(__FILE__) + &quot;/../xml/login_successful.xml&quot;))
+    @profile = NikePlus::Profile.new(profile.root.elements['profile'])
+  end
+  
+  it &quot;should set the id&quot; do
+    @profile.id.should == &quot;123456&quot;
+  end
+  
+  it &quot;should set the first name&quot; do
+    @profile.firstName.should == &quot;John&quot;
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/nikeplus/profile_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,24 +2,22 @@ require File.dirname(__FILE__) + '/../spec_helper'
 
 describe &quot;NikePlus::Session&quot; do
 
-  #TODO update session specs for new structure
-  it &quot;should authenticate on initialization&quot; do
-    pending
+  it &quot;should call authenticate on initialization&quot; do
+    NikePlus::Session.any_instance.expects(:authenticate).with('john@example.com', 'secret').once.returns(true)
+    
+    session = NikePlus::Session.new('john@example.com', 'secret')
   end
   
   it &quot;should fetch runs from API&quot; do
-    pending
-  #   mock_session = mock(NikePlus::Session)
-  #   NikePlus::Session.should_receive(:new).and_return(mock_session)
-  #   mock_session.should_receive(:authenticate).with('john@example.com', 'secret').once.and_return(true)
-  # 
-  #   raw_response = mock(&quot;RawResponse&quot;)
-  #   raw_response.should_receive(:fetch).with('set-cookie').and_return(&quot;COOKIE&quot;)
-  #   raw_response.should_receive(:body).and_return(File.read(File.dirname(__FILE__) + &quot;/../xml/runs_list.xml&quot;))
-  #   
-  #   mock_session.should_receive(:send_request).with(NikePlus::Base::RUNS_LIST_URL).and_return(NikePlus::HttpResponse.new(raw_response))
-  #   
-  #   nikeplus = NikePlus.new('john@example.com', 'secret')
-  #   nikeplus.runs
+    NikePlus::Session.any_instance.expects(:authenticate).with('john@example.com', 'secret').once.returns(true)
+    
+    raw_response = mock(&quot;RawResponse&quot;)
+    raw_response.expects(:body).returns(File.read(File.dirname(__FILE__) + &quot;/../xml/runs_list.xml&quot;))
+    
+    NikePlus::Session.any_instance.expects(:send_request).returns(NikePlus::HttpResponse.new(raw_response))
+    NikePlus::Run.expects(:new).times(10)
+    
+    session = NikePlus::Session.new('john@example.com', 'secret')
+    session.runs
   end
 end
\ No newline at end of file</diff>
      <filename>spec/nikeplus/session_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ca4a37dfe59055240d0b14ebc33007eb85ef6ef</id>
    </parent>
  </parents>
  <author>
    <name>Thomas</name>
    <email>thomaspomfret@gmail.com</email>
  </author>
  <url>http://github.com/fixlr/nikeplus-ruby/commit/a0f46fe11c1d3c3e5b21fab19ab1bd5ba7972591</url>
  <id>a0f46fe11c1d3c3e5b21fab19ab1bd5ba7972591</id>
  <committed-date>2009-01-09T09:29:20-08:00</committed-date>
  <authored-date>2009-01-09T09:29:20-08:00</authored-date>
  <message>some work on specs</message>
  <tree>3340ef3eb0595b170b1d9b56515f6b681da884b6</tree>
  <committer>
    <name>Thomas</name>
    <email>thomaspomfret@gmail.com</email>
  </committer>
</commit>
