Stubbing helpers

Hi,

Is it possible to stub out a helper for development?

I've got a (view) helper that renders a partial and runs all kind of javascript. But for dev purposes I'd like it to return some hardcoded html. I'm not having any success stubbing the helper out. Something like...

test/mocks/development/helper_stub.rb

require 'application_helper' class ApplicationController < ActionController::Base   def my_helper     "<div>Hard-coded stuff</div>"   end end

Can this be done? Thanks, --Trevor

You can test RAILS_ENV in your class or module definition: module MyHelper if RAILS_ENV == ‘development’ def my_helper() ‘

junk
’ end

else
  def my_helper() content_tag :div, special_junk end
end

end

jeremy