<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -37,10 +37,6 @@ module ExceptionNotification
   
   private
   
-  def generic_request
-    g = ActionController::AbstractRequest.new
-    g.relative_url_root = &quot;/&quot;
-  end
   def status_404(request = generic_request)
     headers[&quot;Status&quot;] = &quot;404 Not Found&quot;
     page = Page.find_error_page(404)
@@ -55,4 +51,9 @@ module ExceptionNotification
     response.body = page.render
   end
   
+  def generic_request
+    g = ActionController::AbstractRequest.new
+    g.relative_url_root = &quot;/&quot;
+  end
+
 end
\ No newline at end of file</diff>
      <filename>lib/exception_notification.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ class ExceptionNotificationTest &lt; Test::Unit::TestCase
     @request = ActionController::TestRequest.new
     @response = ActionController::TestResponse.new
     ActionController::Base.consider_all_requests_local = false
+    ExceptionNotifier.stubs(:deliver_notification)
   end
   
   def teardown
@@ -26,7 +27,7 @@ class ExceptionNotificationTest &lt; Test::Unit::TestCase
     exception = ActiveRecord::RecordNotFound.new
     ExceptionNotifier.expects(:deliver_notification).never
     @controller.expects(:show_page).raises(exception)
-    Page.expects(:find_error_page).with(404).returns(mock(:render =&gt; '404 template'))
+    Page.expects(:find_error_page).with(404).returns(mock(:render =&gt; '404 template', :request= =&gt; @request))
     @response.expects(:body=).with('404 template')
     get :show_page, :url =&gt; &quot;/&quot;
     assert_response :missing
@@ -36,18 +37,19 @@ class ExceptionNotificationTest &lt; Test::Unit::TestCase
     exception = NoMethodError.new
     @controller.expects(:show_page).raises(exception)
     ExceptionNotifier.expects(:deliver_notification)
-    Page.expects(:find_error_page).with(500).returns(mock(:render =&gt; '500 template'))
+    Page.expects(:find_error_page).with(500).returns(mock(:render =&gt; '500 template', :request= =&gt; @request))
     @response.expects(:body=).with('500 template')
     get :show_page, :url =&gt; &quot;/&quot;
     assert_response :error
   end
   
-  def test_500_internal_server_error_page_with_tags
-    # TODO
-    # set up an InternalServerError page with a body that has &quot;&lt;r:breadcrumbs/&gt; or &lt;r:url/&gt; in it&quot;
-    # status_500(nil) should raise an exception
-    # status_500 should no longer raise an exception
-    # status_500(@request) should not raise an exception
+  def test_rendered_page_has_access_to_request
+    url = PagePart.new(:name =&gt; 'body', :content =&gt; '&lt;r:url/&gt;')
+    page = Page.new(:parts =&gt; [url], :slug =&gt; '/bogus-url')
+    @controller.expects(:show_page).raises(NoMethodError.new)
+    Page.stubs(:find_error_page).with(500).returns(page)
+    get :show_page
+    assert_match(/bogus-url/, @response.body)
   end
 
 end
\ No newline at end of file</diff>
      <filename>test/functional/exception_notification_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cf2f0ec4aad92ac36e2b734631f2282c8aac8ce6</id>
    </parent>
  </parents>
  <author>
    <name>Josh French</name>
    <email>josh@digitalpulp.com</email>
  </author>
  <url>http://github.com/digitalpulp/radiant-exception-notification-extension/commit/ac8985fc925797fdd40b5d1d4699a092cab8cc25</url>
  <id>ac8985fc925797fdd40b5d1d4699a092cab8cc25</id>
  <committed-date>2008-08-07T14:47:06-07:00</committed-date>
  <authored-date>2008-08-07T14:47:06-07:00</authored-date>
  <message>Test for page.request</message>
  <tree>6fcefbce01234811300b41a079505c245d1bfb76</tree>
  <committer>
    <name>Josh French</name>
    <email>josh@digitalpulp.com</email>
  </committer>
</commit>
