<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -125,10 +125,6 @@ For example:
       response_code / 100 == 3
     end
 
-    # def internal_redirect? #:nodoc:
-    #   redirect? &amp;&amp; current_host == response_location_host
-    # end
-
     def internal_redirect?
       return false unless redirect?
       #should keep internal_redirects if the subdomain changes
@@ -136,6 +132,11 @@ For example:
       response_location_host_domain = response_location_host.split('.')[-2..-1].join('.') rescue response_location_host
       current_host_domain == response_location_host_domain
     end
+    
+    #easy helper to pull out where we were redirected to
+    def redirected_to
+      redirect? ? response_location : nil
+    end
 
     def exception_caught? #:nodoc:
       response_body =~ /Exception caught/</diff>
      <filename>lib/webrat/core/session.rb</filename>
    </modified>
    <modified>
      <diff>@@ -184,6 +184,24 @@ describe Webrat::Session do
       webrat_session.stub!(:response_location =&gt; &quot;http://login.google.com&quot;)
       webrat_session.internal_redirect?.should be_false
     end
-
   end
+  
+  describe &quot;#redirected_to&quot; do
+    before(:each) do
+      webrat_session = Webrat::Session.new
+    end
+    
+    it &quot;should return nil if not redirected&quot; do
+      webrat_session.stub!(:redirect? =&gt; false)
+      webrat_session.redirected_to.should be_nil
+    end
+    
+    it &quot;should return the response_location if redirected&quot; do
+      webrat_session.stub!(:redirect?         =&gt; true)
+      webrat_session.stub!(:response_location =&gt; &quot;http://www.example.com&quot;)
+      webrat_session.redirected_to.should == &quot;http://www.example.com&quot;
+    end
+  
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/private/core/session_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce36e5890fc35ae87f02d1dcd9b6ea37dc052c4b</id>
    </parent>
  </parents>
  <author>
    <name>Adam Greene</name>
    <email>adam@6bar8.com</email>
  </author>
  <url>http://github.com/brynary/webrat/commit/4e3cf59920472cd0164fdfcd883bfcba0ff56b44</url>
  <id>4e3cf59920472cd0164fdfcd883bfcba0ff56b44</id>
  <committed-date>2009-01-20T16:30:22-08:00</committed-date>
  <authored-date>2009-01-16T12:12:50-08:00</authored-date>
  <message>adding a helper method to make it easier to see where the user was redirected_to</message>
  <tree>b631a2e9a5a05e2c718493d9d35f1ea9d8b33889</tree>
  <committer>
    <name>Josh Knowles</name>
    <email>joshknowles@gmail.com</email>
  </committer>
</commit>
