<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Upgrade.txt</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,16 +1,25 @@
 === Maintenance
 
-IMPORTANT: rspec-rails supports rails 2.0.2, 2.1.2 and 2.2.2. We are no longer
-supporting 1.x versions of rails.
+IMPORTANT: This release includes the following backwards-compatibility-breaking changes.
 
-IMPORTANT: expect_render and stub_render have been removed. Both of these
-methods were deprecated in rspec-rails-1.1.5, released in Sept, 2008.
+* rspec-rails supports rails 2.0.2, 2.1.2 and 2.2.2.
+  
+  * We are no longer supporting 1.x versions of rails.
+
+* expect_render and stub_render have been removed.
+
+  * Both of these methods were deprecated in rspec-rails-1.1.5, released in Sept, 2008.
+  
+* { route_for(args).should == &quot;/path&quot; } now delegates to assert_generates (in rails)
+
+  * see Upgrade.txt for more information
 
-* 3 enhancements
+* 4 enhancements
 
   * Adding status codes to redirect_to matcher (Damian Janowski). Closes #570.
   * Initialize current URL before executing any examples in a ViewExampleGroup (Wilson Bilkovich). Closes #654.
   * Support query strings in params_from (Wilson Bilkovich). Closes #652.
+  * delegate route_for to assert_recognizes (less brittle)
 
 === Version 1.1.12 / 2009-01-11
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -11,19 +11,23 @@ describe &lt;%= controller_class_name %&gt;Controller do
     end
   
     it &quot;should map #show&quot; do
-      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;show&quot;, :id =&gt; 1).should == &quot;/&lt;%= table_name %&gt;/1&quot;
+      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;show&quot;, :id =&gt; &quot;1&quot;).should == &quot;/&lt;%= table_name %&gt;/1&quot;
     end
   
     it &quot;should map #edit&quot; do
-      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;edit&quot;, :id =&gt; 1).should == &quot;/&lt;%= table_name %&gt;/1&lt;%= resource_edit_path %&gt;&quot;
-    end
-  
-    it &quot;should map #update&quot; do
-      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;update&quot;, :id =&gt; 1).should == &quot;/&lt;%= table_name %&gt;/1&quot;
+      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;edit&quot;, :id =&gt; &quot;1&quot;).should == &quot;/&lt;%= table_name %&gt;/1&lt;%= resource_edit_path %&gt;&quot;
     end
+
+  it &quot;should map #create&quot; do
+    route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;create&quot;).should == {:path =&gt; &quot;/&lt;%= table_name %&gt;&quot;, :method =&gt; :post}
+  end
+
+  it &quot;should map #update&quot; do
+    route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;update&quot;, :id =&gt; &quot;1&quot;).should == {:path =&gt;&quot;/&lt;%= table_name %&gt;/1&quot;, :method =&gt; :put}
+  end
   
     it &quot;should map #destroy&quot; do
-      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;destroy&quot;, :id =&gt; 1).should == &quot;/&lt;%= table_name %&gt;/1&quot;
+      route_for(:controller =&gt; &quot;&lt;%= table_name %&gt;&quot;, :action =&gt; &quot;destroy&quot;, :id =&gt; &quot;1&quot;).should == {:path =&gt;&quot;/&lt;%= table_name %&gt;/1&quot;, :method =&gt; :delete}
     end
   end
 </diff>
      <filename>generators/rspec_scaffold/templates/routing_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -115,6 +115,24 @@ module Spec
           end
           @integrate_views = self.class.integrate_views?
         end
+        
+        class RouteForMatcher
+          def initialize(example, options)
+            @example, @options = example, options
+          end
+          
+          def ==(expected)
+            if Hash === expected
+              path, querystring = expected[:path].split('?')
+              path = expected.merge(:path =&gt; path)
+            else
+              path, querystring = expected.split('?')
+            end
+            params = querystring.blank? ? {} : @example.params_from_querystring(querystring)
+            @example.assert_recognizes(@options, path, params)
+            true
+          end
+        end
 
         # Uses ActionController::Routing::Routes to generate
         # the correct route for a given set of options.
@@ -122,8 +140,7 @@ module Spec
         #   route_for(:controller =&gt; 'registrations', :action =&gt; 'edit', :id =&gt; 1)
         #     =&gt; '/registrations/1;edit'
         def route_for(options)
-          ensure_that_routes_are_loaded
-          ActionController::Routing::Routes.generate(options)
+          RouteForMatcher.new(self, options)
         end
 
         # Uses ActionController::Routing::Routes to parse</diff>
      <filename>lib/spec/rails/example/controller_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -191,6 +191,9 @@ require 'controller_spec_controller'
       end
     end
 
+    class CustomRouteSpecController &lt; ActionController::Base; end
+    class RspecOnRailsSpecsController &lt; ActionController::Base; end
+
     it &quot;should support custom routes&quot; do
       route_for(:controller =&gt; &quot;custom_route_spec&quot;, :action =&gt; &quot;custom_route&quot;).
         should == &quot;/custom_route&quot;
@@ -205,6 +208,11 @@ require 'controller_spec_controller'
       route_for(:controller =&gt; &quot;controller_spec&quot;, :action =&gt; &quot;some_action&quot;, :param =&gt; '1').
         should == &quot;/controller_spec/some_action?param=1&quot;
     end
+    
+    it &quot;recognizes routes with methods besides :get&quot; do
+      route_for(:controller =&gt; &quot;rspec_on_rails_specs&quot;, :action =&gt; &quot;update&quot;, :id =&gt; &quot;37&quot;).
+        should == {:path =&gt; &quot;/rspec_on_rails_specs/37&quot;, :method =&gt; :put}
+    end
 
     it &quot;should generate params for custom routes&quot; do
       params_from(:get, '/custom_route').</diff>
      <filename>spec/spec/rails/example/controller_example_group_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2e2ed86f7306dc570bac7ad74951f11e951b7a81</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/939d745440d70f6a5a8165b29bcfa2bbe2a257e8</url>
  <id>939d745440d70f6a5a8165b29bcfa2bbe2a257e8</id>
  <committed-date>2009-01-18T19:50:04-08:00</committed-date>
  <authored-date>2009-01-18T19:31:20-08:00</authored-date>
  <message>Delegate route_for to assert_recognizes.

This could break *some* examples out in the wild. See Upgrade.txt for
more information.</message>
  <tree>8d78fbeda76e1289e6f0d4967b7b11061dc41be0</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
