diff options
author | Xavier Noria <fxn@hashref.com> | 2010-04-03 10:56:15 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-04-03 10:56:15 -0700 |
commit | 11161e6c96fb6686a33e05ead106b96089ff9790 (patch) | |
tree | 35d5618f1a866ce8ba11efd8e6851d2fd7bbf5fc /actionpack/test/abstract_unit.rb | |
parent | 4996d1a445acd965d0064500ad00d692a742f669 (diff) | |
parent | 467d251c3dcbd3e4dd1e785a21d63535b795a64c (diff) | |
download | rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.gz rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.bz2 rails-11161e6c96fb6686a33e05ead106b96089ff9790.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 143491a640..fe78b8ec1f 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -57,6 +57,18 @@ module RackTestUtils extend self end +module RenderERBUtils + def render_erb(string) + template = ActionView::Template.new( + string.strip, + "test template", + ActionView::Template::Handlers::ERB, + {}) + + template.render(self, {}).strip + end +end + module SetupOnce extend ActiveSupport::Concern @@ -225,6 +237,14 @@ class Rack::TestCase < ActionController::IntegrationTest end end +class ActionController::Base + def self.test_routes(&block) + router = ActionDispatch::Routing::RouteSet.new + router.draw(&block) + include router.url_helpers + end +end + class ::ApplicationController < ActionController::Base end |