<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm getting a conflict between the Mocha plugin and the Rails SimplyHelpful plugin.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>For some reason the dom_id method from SimplyHelpful is not being found in my views when the Mocha plugin is installed. The dom_id method if used in the controller works properly.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is the error I get when running the tests:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">1) Error:</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">test_truth(HmmControllerTest):</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">ActionView::TemplateError: undefined method `dom_id' for #&lt;#&lt;Class:0x3a529ec&gt;:0x3a529c4&gt;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">    On line #2 of app/views/hmm/index.rhtml</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12.4px/normal Bitstream Vera Sans Mono; background-color: rgb(240, 240, 240); min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">    1: &lt;%= @car_dom_id %&gt;</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(240, 240, 240); "><FONT class="Apple-style-span" face="Bitstream Vera Sans Mono" size="3"><SPAN class="Apple-style-span" style="font-size: 12.4px;">    2: &lt;%= dom_id(@car) %&gt;</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here's my controller:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>class HmmController &lt; ApplicationController</DIV><DIV>  def index</DIV><DIV>    @car = Car.find(1)</DIV><DIV>    @car_dom_id = dom_id(@car)</DIV><DIV>  end</DIV><DIV>end</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here's my view:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>#app/views/hmm/index.rhtml</DIV><DIV>&lt;%= @car_dom_id %&gt;</DIV><DIV>&lt;%= dom_id(@car) %&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here's my test:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>require File.dirname(__FILE__) + '/../test_helper'</DIV><DIV>require 'hmm_controller'</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV># Re-raise errors caught by the controller.</DIV><DIV>class HmmController; def rescue_action(e) raise e end; end</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>class HmmControllerTest &lt; Test::Unit::TestCase</DIV><DIV>  fixtures :cars</DIV><DIV>  </DIV><DIV>  def setup</DIV><DIV>    @controller = HmmController.new</DIV><DIV>    @request    = ActionController::TestRequest.new</DIV><DIV>    @response   = ActionController::TestResponse.new</DIV><DIV>  end</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>  # Replace this with your real tests.</DIV><DIV>  def test_truth</DIV><DIV>    get :index</DIV><DIV>    assert_equal "car_1", assigns(:car_dom_id)</DIV><DIV>  end</DIV><DIV>end</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is just an empty rails project running Edge Rails, i.e. rake rails:freeze:edge with the Mocha plugin (./script/plugin install svn://rubyforge.org/var/svn/mocha/trunk) and SimplyHelpful plugin (./script/plugin install simply_helpful) installed.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Anyone run into this sort of thing before?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Jonathan</DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>