<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -196,7 +196,8 @@ module Spec
                 end
                 (class &lt;&lt; @template; self; end).class_eval do
                   define_method :render_file do |*args|
-                    @first_render ||= args[0]
+                    @first_render ||= args[0] # rails up 2.1.0
+                    @_first_render ||= args[0] # rails edge &gt; 2.1.0
                   end
                 end
               end</diff>
      <filename>lib/spec/rails/example/controller_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,10 +10,21 @@ module Spec
         end
       
         def matches?(response)
-          @actual = response.rendered_file
-          full_path(@actual) == full_path(@expected)
+          if response.respond_to?(:rendered_file)
+            @actual = response.rendered_file
+            full_path(@actual) == full_path(@expected)
+          else
+            @actual = response.rendered_template.to_s
+            if @expected =~ /\//
+              given_controller_path, given_file = path_and_file(@actual)
+              expected_controller_path, expected_file = path_and_file(@expected)
+              given_controller_path == expected_controller_path &amp;&amp; given_file.match(expected_file)
+            else
+              current_controller_path == controller_path_from(@actual) &amp;&amp; @actual.match(@expected)
+            end
+          end
         end
-
+        
         def failure_message
           &quot;expected #{@expected.inspect}, got #{@actual.inspect}&quot;
         end
@@ -27,9 +38,25 @@ module Spec
         end
       
         private
+          def path_and_file(path)
+            parts = path.split('/')
+            file = parts.pop
+            return parts.join('/'), file
+          end
+        
+          def controller_path_from(path)
+            parts = path.split('/')
+            parts.pop
+            parts.join('/')
+          end
+
           def full_path(path)
             return nil if path.nil?
-            path.include?('/') ? path : &quot;#{@controller.class.to_s.underscore.gsub('_controller','')}/#{path}&quot;
+            path.include?('/') ? path : &quot;#{current_controller_path}/#{path}&quot;
+          end
+        
+          def current_controller_path
+            @controller.class.to_s.underscore.gsub(/_controller$/,'')
           end
         
       end</diff>
      <filename>lib/spec/rails/matchers/render_template.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
     if mode == 'integration'
       integrate_views
     end
-    
+
     it &quot;should match a simple path&quot; do
       post 'some_action'
       response.should render_template('some_action')
@@ -51,35 +51,35 @@ require File.dirname(__FILE__) + '/../../spec_helper'
       post 'some_action'
       lambda do
         response.should render_template('non_existent_template')
-      end.should fail_with(&quot;expected \&quot;non_existent_template\&quot;, got \&quot;render_spec/some_action\&quot;&quot;)
+      end.should fail_with(/expected \&quot;non_existent_template\&quot;, got \&quot;render_spec\/some_action(.rhtml)?\&quot;/)
     end
 
     it &quot;should fail without full path when template is associated with a different controller&quot; do
       post 'action_which_renders_template_from_other_controller'
       lambda do
         response.should render_template('action_with_template')
-      end.should fail_with(%Q|expected &quot;action_with_template&quot;, got &quot;controller_spec/action_with_template&quot;|)
+      end.should fail_with(/expected \&quot;action_with_template\&quot;, got \&quot;controller_spec\/action_with_template(.rhtml)?\&quot;/)
     end
 
     it &quot;should fail with incorrect full path when template is associated with a different controller&quot; do
       post 'action_which_renders_template_from_other_controller'
       lambda do
         response.should render_template('render_spec/action_with_template')
-      end.should fail_with(%Q|expected &quot;render_spec/action_with_template&quot;, got &quot;controller_spec/action_with_template&quot;|)
+      end.should fail_with(/expected \&quot;render_spec\/action_with_template\&quot;, got \&quot;controller_spec\/action_with_template(\.rhtml)?\&quot;/)
     end
 
     it &quot;should fail on the wrong extension (given rhtml)&quot; do
       get 'some_action'
       lambda {
         response.should render_template('render_spec/some_action.rjs')
-      }.should fail_with(&quot;expected \&quot;render_spec/some_action.rjs\&quot;, got \&quot;render_spec/some_action\&quot;&quot;)
+      }.should fail_with(/expected \&quot;render_spec\/some_action\.rjs\&quot;, got \&quot;render_spec\/some_action(\.rhtml)?\&quot;/)
     end
 
     it &quot;should fail when TEXT is rendered&quot; do
       post 'text_action'
       lambda do
         response.should render_template('some_action')
-      end.should fail_with(&quot;expected \&quot;some_action\&quot;, got nil&quot;)
+      end.should fail_with(/expected \&quot;some_action\&quot;, got (nil|\&quot;\&quot;)/)
     end
   end
   </diff>
      <filename>spec/rails/matchers/render_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6c6e0ded3bd72244bcfdaba854ac5e2e634c8e1d</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>david@chelimac.local</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/6499e4e0d26451c090d88c4312fa245c189979b1</url>
  <id>6499e4e0d26451c090d88c4312fa245c189979b1</id>
  <committed-date>2008-07-17T20:58:17-07:00</committed-date>
  <authored-date>2008-07-17T20:58:17-07:00</authored-date>
  <message>Update handling of rendering to accomodate changes in edge rails. [#471 state:resolved milestone:&quot;1.1.5&quot;]</message>
  <tree>fd957c4852b28996be75880ec37433ae04b94412</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>david@chelimac.local</email>
  </committer>
</commit>
