Skip to content

Instantly share code, notes, and snippets.

@paulanthonywilson
Created July 6, 2009 15:41
Show Gist options
  • Save paulanthonywilson/141493 to your computer and use it in GitHub Desktop.
Save paulanthonywilson/141493 to your computer and use it in GitHub Desktop.
# from http://broadcast.oreilly.com/2008/10/testing-rails-partials.html
class ApplicationController
def _renderizer; render params[:args]; end
end
class ActionController::TestCase # or Test::Unit::TestCase, for Rails <2.0
def render(args); get :_renderizer, :args => args; end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment