<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">7315</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-02-06T02:21:50+01:00</created-at>
  <creator-id type="integer">192</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">275</number>
  <permalink>mock_model-is-unusable-when-using-mocha</permalink>
  <priority type="integer">6443</priority>
  <project-id type="integer">5645</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>invalid</state>
  <tag nil="true"></tag>
  <title>mock_model is unusable when using Mocha</title>
  <updated-at type="datetime">2008-08-29T15:15:13+02:00</updated-at>
  <user-id type="integer">20392</user-id>
  <user-name>gravelpup</user-name>
  <creator-name>Mislav</creator-name>
  <assigned-user-name>David Chelimsky</assigned-user-name>
  <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
  <original-body>I have configured my specs to use Mocha because, from what I've seen, Mocha is superior to mocking support in RSpec.

@@@ ruby
Spec::Runner.configure do |config|
  config.mock_with :mocha
end
@@@

Unfortunately, mock_model from Spec::Rails is then rendered unusable. That method uses the mock method to set stubs with second argument:

@@@ ruby
m = mock(&quot;#{model_class.name}_#{id}&quot;, options_and_stubs)
@@@

But, in Mocha, the second argument for mock method are *expected methods*, not stubs! As the result, each call to mock_method sets 4 expectations:

@@@
id, to_param, new_record?, errors
@@@

Instead, mock_model should use &quot;stub&quot; with Mocha. I have no idea how to accomplish this without branching code internally in the mock_model method. That would possibly turn out simple, but would definitely be ugly. Maybe the mocking frameworks' adapters could be modified instead?</original-body>
  <latest-body>I have configured my specs to use Mocha because, from what I've seen, Mocha is superior to mocking support in RSpec.

@@@ ruby
Spec::Runner.configure do |config|
  config.mock_with :mocha
end
@@@

Unfortunately, mock_model from Spec::Rails is then rendered unusable. That method uses the mock method to set stubs with second argument:

@@@ ruby
m = mock(&quot;#{model_class.name}_#{id}&quot;, options_and_stubs)
@@@

But, in Mocha, the second argument for mock method are *expected methods*, not stubs! As the result, each call to mock_method sets 4 expectations:

@@@
id, to_param, new_record?, errors
@@@

Instead, mock_model should use &quot;stub&quot; with Mocha. I have no idea how to accomplish this without branching code internally in the mock_model method. That would possibly turn out simple, but would definitely be ugly. Maybe the mocking frameworks' adapters could be modified instead?</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;
I have configured my specs to use Mocha because, from what I've seen, Mocha is superior to mocking support in RSpec.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;Spec::Runner.configure do |config|
  config.mock_with :mocha
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Unfortunately, mock_model from Spec::Rails is then rendered unusable. That method uses the mock method to set stubs with second argument:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;m = mock(&amp;quot;#{model_class.name}_#{id}&amp;quot;, options_and_stubs)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
But, in Mocha, the second argument for mock method are *expected methods*, not stubs! As the result, each call to mock_method sets 4 expectations:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;&quot;&gt;id, to_param, new_record?, errors&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Instead, mock_model should use &quot;stub&quot; with Mocha. I have no idea how to accomplish this without branching code internally in the mock_model method. That would possibly turn out simple, but would definitely be ugly. Maybe the mocking frameworks' adapters could be modified instead?
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I have configured my specs to use Mocha because, from what I've seen, Mocha is superior to mocking support in RSpec.

@@@ ruby
Spec::Runner.configure do |config|
  config.mock_with :mocha
end
@@@

Unfortunately, mock_model from Spec::Rails is then rendered unusable. That method uses the mock method to set stubs with second argument:

@@@ ruby
m = mock(&quot;#{model_class.name}_#{id}&quot;, options_and_stubs)
@@@

But, in Mocha, the second argument for mock method are *expected methods*, not stubs! As the result, each call to mock_method sets 4 expectations:

@@@
id, to_param, new_record?, errors
@@@

Instead, mock_model should use &quot;stub&quot; with Mocha. I have no idea how to accomplish this without branching code internally in the mock_model method. That would possibly turn out simple, but would definitely be ugly. Maybe the mocking frameworks' adapters could be modified instead?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I have configured my specs to use Mocha because, from what I've seen, Mocha is superior to mocking support in RSpec.
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;Spec::Runner.configure do |config|
  config.mock_with :mocha
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Unfortunately, mock_model from Spec::Rails is then rendered unusable. That method uses the mock method to set stubs with second argument:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;m = mock(&amp;quot;#{model_class.name}_#{id}&amp;quot;, options_and_stubs)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
But, in Mocha, the second argument for mock method are *expected methods*, not stubs! As the result, each call to mock_method sets 4 expectations:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;&quot;&gt;id, to_param, new_record?, errors&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Instead, mock_model should use &quot;stub&quot; with Mocha. I have no idea how to accomplish this without branching code internally in the mock_model method. That would possibly turn out simple, but would definitely be ugly. Maybe the mocking frameworks' adapters could be modified instead?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-02-06T02:21:50+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T02:21:50+01:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sorry, but I think if you're using a mock framework other than RSpec's, it is up to that framework to satisfy this problem. Flexmock, for example already has a mock_model (or similar) method.

I'd raise this issue in the mocha tracker.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
Sorry, but I think if you're using a mock framework other than RSpec's, it is up to that framework to satisfy this problem. Flexmock, for example already has a mock_model (or similar) method.
&lt;/p&gt;&lt;p&gt;
I'd raise this issue in the mocha tracker.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T16:09:21+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T16:09:21+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I don't see why I should file this in the Mocha tracker. It certainly is not a bug in their framework. I've filed the issue here because this is a case of APIs that don't match: mock in RSpec isn't equivalent to mock in Mocha.

Isn't that the issue of the adapters in RSpec? The adapters were there to hide the frameworks' APIs under one common API.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I don't see why I should file this in the Mocha tracker. It certainly is not a bug in their framework. I've filed the issue here because this is a case of APIs that don't match: mock in RSpec isn't equivalent to mock in Mocha.
&lt;/p&gt;&lt;p&gt;
Isn't that the issue of the adapters in RSpec? The adapters were there to hide the frameworks' APIs under one common API.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T16:33:23+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T16:33:23+01:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The adapters are there to support using other frameworks, not to hide them from you. Nor are they there to enhance other frameworks.

If the adapter was hiding mocha from you then it would force you to say &quot;should_receive&quot; instead of &quot;expects&quot; and delegate that call to mocha.

Plus, making this a mocha feature request will benefit all users of mocha, not just those who choose rspec.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
The adapters are there to support using other frameworks, not to hide them from you. Nor are they there to enhance other frameworks.
&lt;/p&gt;&lt;p&gt;
If the adapter was hiding mocha from you then it would force you to say &quot;should_receive&quot; instead of &quot;expects&quot; and delegate that call to mocha.
&lt;/p&gt;&lt;p&gt;
Plus, making this a mocha feature request will benefit all users of mocha, not just those who choose rspec.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T16:20:48+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T16:20:48+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I see. You are right. But if I suggest/contribute the mock_model feature to Mocha and it gets added under that name, isn't the method from Spec::Rails still going to be called when I use mock_model in my specs?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I see. You are right. But if I suggest/contribute the mock_model feature to Mocha and it gets added under that name, isn't the method from Spec::Rails still going to be called when I use mock_model in my specs?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T16:26:49+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T16:26:49+01:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Now *that's* a horse of a different color!

There are a couple of other convenience methods that rely on rspec's
mocks that init Spec::Mocks::Mock explicitly instead of using the mock
method. In this case, we need to actually redefine the method.

That could probably be handled in the mocha adapter by having it undef
mock_model before mixing in the mocha methods. WDYT?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
Now &lt;strong&gt;that's&lt;/strong&gt; a horse of a different color!
&lt;/p&gt;&lt;p&gt;
There are a couple of other convenience methods that rely on rspec's
&lt;/p&gt;&lt;p&gt;
mocks that init Spec::Mocks::Mock explicitly instead of using the mock
&lt;/p&gt;&lt;p&gt;
method. In this case, we need to actually redefine the method.
&lt;/p&gt;&lt;p&gt;
That could probably be handled in the mocha adapter by having it undef
&lt;/p&gt;&lt;p&gt;
mock_model before mixing in the mocha methods. WDYT?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T16:40:15+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T16:40:15+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'm definitely for undef, which can even be done unconditionally (regardless of the Mocha version I mean) because mock_model is unusable, anyway.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I'm definitely for undef, which can even be done unconditionally (regardless of the Mocha version I mean) because mock_model is unusable, anyway.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-02-06T17:08:51+01:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-02-06T17:08:51+01:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I applied the following dirty hack to my spec_helper.rb

# Brings in the __mock_proxy
Mocha::Mock.send(:include, Spec::Mocks::Methods)

# Overwrites :mock method with :stub, so I stop
# getting exceptions for to_params not being called
Test::Unit::TestCase.send(:alias_method, :mock, :stub)</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I applied the following dirty hack to my spec_helper.rb
&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;
Brings in the __mock_proxy
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;
Mocha::Mock.send(:include, Spec::Mocks::Methods)
&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;
Overwrites :mock method with :stub, so I stop
&lt;/li&gt;&lt;li&gt;
getting exceptions for to_params not being called
&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;
Test::Unit::TestCase.send(:alias_method, :mock, :stub)
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-05T20:34:47+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-05T20:34:47+02:00</updated-at>
      <user-id type="integer">8789</user-id>
      <user-name>Jeremy Friesen</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Your hacks are indeed dirty, especially the other one which, uh, overwrites the &quot;mock&quot; method everywhere.

These are my hacks which are not destructive:

@@@ ruby
# override spec-rails stuff because of Mocha
module Spec::Rails::Mocks
  def mock_model(model_class, 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 = stub(&quot;#{model_class.name}_#{options_and_stubs[:id]}&quot;, options_and_stubs)
    m.instance_eval &lt;&lt;-CODE
      def is_a?(other)
        #{model_class}.ancestors.include?(other)
      end
      def kind_of?(other)
        #{model_class}.ancestors.include?(other)
      end
      def instance_of?(other)
        other == #{model_class}
      end
      def class
        #{model_class}
      end
    CODE
    yield m if block_given?
    m
  end
  
  # fixes spec_model
  def add_stubs(object, stubs = {})
    m = String === object || Symbol === object ? mock(object.to_s) : object
    stubs.each { |k, v| m.stubs(k).returns(v) }
    m
  end
end
@@@</body>
      <body-html>&lt;div&gt;&lt;p&gt;
Your hacks are indeed dirty, especially the other one which, uh, overwrites the &quot;mock&quot; method everywhere.
&lt;/p&gt;&lt;p&gt;
These are my hacks which are not destructive:
&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;# override spec-rails stuff because of Mocha
module Spec::Rails::Mocks
  def mock_model(model_class, options_and_stubs = {})
    id = next_id
    options_and_stubs.reverse_merge! :id =&amp;gt; id,
      :to_param =&amp;gt; id.to_s,
      :new_record? =&amp;gt; false,
      :errors =&amp;gt; stub(&amp;quot;errors&amp;quot;, :count =&amp;gt; 0)
      
    m = stub(&amp;quot;#{model_class.name}_#{options_and_stubs[:id]}&amp;quot;, options_and_stubs)
    m.instance_eval &amp;lt;&amp;lt;-CODE
      def is_a?(other)
        #{model_class}.ancestors.include?(other)
      end
      def kind_of?(other)
        #{model_class}.ancestors.include?(other)
      end
      def instance_of?(other)
        other == #{model_class}
      end
      def class
        #{model_class}
      end
    CODE
    yield m if block_given?
    m
  end
  
  # fixes spec_model
  def add_stubs(object, stubs = {})
    m = String === object || Symbol === object ? mock(object.to_s) : object
    stubs.each { |k, v| m.stubs(k).returns(v) }
    m
  end
end&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-06T14:26:27+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-06T14:26:27+02:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Mislav - I'm thinking that RSpec's mock_model should be disabled if other frameworks are being used - then you could release your code as a plugin for all the world to use w/o monkey patching.

WDYT?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
Mislav - I'm thinking that RSpec's mock_model should be disabled if other frameworks are being used - then you could release your code as a plugin for all the world to use w/o monkey patching.
&lt;/p&gt;&lt;p&gt;
WDYT?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-06T15:28:03+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-06T15:28:03+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I agree that mock_model and stub_model should be disabled. But I also think that Mocha equivalents of these could be included with RSpec. I could contribute that.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I agree that mock_model and stub_model should be disabled. But I also think that Mocha equivalents of these could be included with RSpec. I could contribute that.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-06T20:25:16+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-06T20:25:16+02:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'd rather you publish them separately. We've had a couple of similar contributions in the past that stopped working when the other libraries changed, increasing what is already a significant maintenance burden.

Are you open to publishing/maintaining your own plugin?</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I'd rather you publish them separately. We've had a couple of similar contributions in the past that stopped working when the other libraries changed, increasing what is already a significant maintenance burden.
&lt;/p&gt;&lt;p&gt;
Are you open to publishing/maintaining your own plugin?
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-06T20:34:54+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-06T20:34:54+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Yeah, I will use it myself so no problem pushing it on GitHub. I would probably call it &quot;rspec-mocha&quot; (following the &quot;rspec-rails&quot; convention).</body>
      <body-html>&lt;div&gt;&lt;p&gt;
Yeah, I will use it myself so no problem pushing it on GitHub. I would probably call it &quot;rspec-mocha&quot; (following the &quot;rspec-rails&quot; convention).
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-06-06T20:47:23+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-06-06T20:47:23+02:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>@Mislav: any progress on that plugin? I'd be interested in grabbing it when it's up on GitHub.</body>
      <body-html>&lt;div&gt;&lt;p&gt;@Mislav: any progress on that plugin? I'd be interested in grabbing it when it's up on GitHub.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-08-28T23:40:30+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag>mocha mocks mock_model rspec_on_rails stubs</tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-08-28T23:40:30+02:00</updated-at>
      <user-id type="integer">20392</user-id>
      <user-name>gravelpup</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sorry I forgot about this; now it's imported http://github.com/mislav/rspec-rails-mocha/tree/master</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sorry I forgot about this; now it's imported &lt;a href=&quot;http://github.com/mislav/rspec-rails-mocha/tree/master&quot;&gt;http://github.com/mislav/rspec-r...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-08-29T03:50:33+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: mocha mocks mock_model rspec_on_rails stubs
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha-2</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-08-29T03:50:33+02:00</updated-at>
      <user-id type="integer">192</user-id>
      <user-name>Mislav</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Awesome.  Thanks!</body>
      <body-html>&lt;div&gt;&lt;p&gt;Awesome. Thanks!&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-08-29T15:15:13+02:00</created-at>
      <creator-id type="integer">192</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">275</number>
      <permalink>mock_model-is-unusable-when-using-mocha-3</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>invalid</state>
      <tag nil="true"></tag>
      <title>mock_model is unusable when using Mocha</title>
      <updated-at type="datetime">2008-08-29T15:15:13+02:00</updated-at>
      <user-id type="integer">20392</user-id>
      <user-name>gravelpup</user-name>
      <creator-name>Mislav</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/275</url>
    </version>
  </versions>
</ticket>
