<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Spec
       # add_stubs) if +stubs+ is passed.
       def mock_model(model_class, options_and_stubs = {})
         id = options_and_stubs[:id] || next_id
-        options_and_stubs.reverse_merge!({
+        options_and_stubs = options_and_stubs.reverse_merge({
           :id =&gt; id,
           :to_param =&gt; id.to_s,
           :new_record? =&gt; false,</diff>
      <filename>lib/spec/rails/mocks.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,14 @@ describe &quot;mock_model&quot; do
   end
 end
 
+describe &quot;mock_mode with params&quot; do
+  it &quot;should not mutate its parameters&quot; do
+    params = {:a =&gt; 'b'}
+    model = mock_model(MockableModel, params)
+    params.should == {:a =&gt; 'b'}
+  end
+end
+
 describe &quot;mock_model with stubbed id&quot;, :type =&gt; :view do
   before(:each) do
     @model = mock_model(MockableModel, :id =&gt; 1)</diff>
      <filename>spec/rails/mocks/mock_model_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2b25c672537fa3e4ce0341263e890aaa052a8b3e</id>
    </parent>
  </parents>
  <author>
    <name>Reg Vos</name>
    <email>jerry.vos@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec-rails/commit/705355b75b7555940a1d49442ffe5ef5ccccd7a7</url>
  <id>705355b75b7555940a1d49442ffe5ef5ccccd7a7</id>
  <committed-date>2008-08-11T15:00:03-07:00</committed-date>
  <authored-date>2008-06-12T22:31:03-07:00</authored-date>
  <message>don't mutate hash passed to mock_model</message>
  <tree>a890fb741b61c79dfd33ee8c95a64dd96c277932</tree>
  <committer>
    <name>Pat Maddox</name>
    <email>pat.maddox@gmail.com</email>
  </committer>
</commit>
