<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,14 +9,14 @@ module Spec
       # methods stubbed out. Additional methods may be easily stubbed (via
       # add_stubs) if +stubs+ is passed.
       def mock_model(model_class, options_and_stubs = {})
-        id = next_id
+        id = options_and_stubs[:id] || next_id
         options_and_stubs.reverse_merge!({
           :id =&gt; id,
           :to_param =&gt; id.to_s,
           :new_record? =&gt; false,
           :errors =&gt; stub(&quot;errors&quot;, :count =&gt; 0)
         })
-        m = mock(&quot;#{model_class.name}_#{options_and_stubs[:id]}&quot;, options_and_stubs)
+        m = mock(&quot;#{model_class.name}_#{id}&quot;, options_and_stubs)
         m.send(:__mock_proxy).instance_eval &lt;&lt;-CODE
           def @target.is_a?(other)
             #{model_class}.ancestors.include?(other)
@@ -123,4 +123,4 @@ module Spec
 
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/spec/rails/mocks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,6 +32,9 @@ describe &quot;mock_model with stubbed id&quot;, :type =&gt; :view do
   it &quot;should be named using the stubbed id value&quot; do
     @model.instance_variable_get(:@name).should == &quot;MockableModel_1&quot;
   end
+  it &quot;should return string of id value for to_param&quot; do
+    @model.to_param.should == &quot;1&quot;
+  end
 end
 
 describe &quot;mock_model with null_object&quot;, :type =&gt; :view do</diff>
      <filename>spec/rails/mocks/mock_model_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>47350fb4eeabca0cfafc98ca1776772d5dbf240d</id>
    </parent>
  </parents>
  <author>
    <name>Adam Meehan</name>
    <email>adam.meehan@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/9a1e10e7b71f7e8e4fb910a9695ee69abec63816</url>
  <id>9a1e10e7b71f7e8e4fb910a9695ee69abec63816</id>
  <committed-date>2008-07-12T21:33:14-07:00</committed-date>
  <authored-date>2008-06-24T16:19:54-07:00</authored-date>
  <message>fix to_param in mock_model with stubbed id incorrectly returning autogenerated id</message>
  <tree>70bf8a8f9d219ad7882054583359003c51d68536</tree>
  <committer>
    <name>Pat Maddox</name>
    <email>pat.maddox@gmail.com</email>
  </committer>
</commit>
