<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/resources/views/view_spec/path_params.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,9 @@
 === Maintenance
 
+* 1 major enhancement
+
+  * support controller and action path params in view specs (Mike Vincent).
+
 * 1 minor enhancement
 
   * improve rdoc for render_template (Patch from Andrew Premdas). Fixes #571.</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -104,10 +104,9 @@ module Spec
 
           assigns[:action_name] = @action_name
 
-          @request.path_parameters ||= {}
           @request.path_parameters = @request.path_parameters.update(
-            :controller =&gt; derived_controller_name(options),
-            :action =&gt; derived_action_name(options)
+            :controller =&gt; options[:controller] || derived_controller_name(options),
+            :action =&gt; options[:action] || derived_action_name(options)
           )
 
           defaults = { :layout =&gt; false }</diff>
      <filename>lib/spec/rails/example/view_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -249,12 +249,18 @@ describe &quot;render 'view_spec/foo/show.rhtml'&quot;, :type =&gt; :view do
   end
 end
 
-describe &quot;setting special parameters&quot; do
-  it &quot;should not clobber path_parameters so customer path variables can be set&quot; do
-    # hmm, no request object here?
-    request.path_parameters = {:required_parameter =&gt; 'foo'}
-    render &quot;view_spec/entry_form&quot;
-    request.path_parameters[:required_parameter].should == 'foo'
+describe &quot;setting path parameters&quot;, :type =&gt; :view do
+  describe &quot;(controller)&quot; do
+    it &quot;should supercede the default path parameters&quot; do
+      render &quot;view_spec/entry_form&quot;, :controller =&gt; 'foo'
+      request.path_parameters[:controller].should == 'foo'
+    end
+  end
+  describe &quot;(action)&quot; do
+    it &quot;should supercede the default path parameters&quot; do
+      render &quot;view_spec/entry_form&quot;, :action =&gt; 'foo'
+      request.path_parameters[:action].should == 'foo'
+    end
   end
 end
 </diff>
      <filename>spec/rails/example/view_spec_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fb8468b2860fd5b949d2eb54fb9738dcddb25897</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/0461ecfecaa6dd3b88c14ab3ce053263cdba7279</url>
  <id>0461ecfecaa6dd3b88c14ab3ce053263cdba7279</id>
  <committed-date>2008-11-21T17:09:22-08:00</committed-date>
  <authored-date>2008-11-21T17:08:39-08:00</authored-date>
  <message>support controller and action path params in view specs</message>
  <tree>d5212366e399f051cc732a9e4a603c66ffe3555b</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
