aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-04-04 17:34:23 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2010-04-04 17:34:23 +0100
commit00884a59013a658082dab41da5ff41add31b8c43 (patch)
tree666b862b08b04c7a3727ee22b2cd1a2561af4e52 /actionpack/test/abstract_unit.rb
parent48b2451142355b22de5f8130b3debdd4e53e2ba2 (diff)
parent7d7e0627a0490b6b4ddb0ee5429264ccd46f1245 (diff)
downloadrails-00884a59013a658082dab41da5ff41add31b8c43.tar.gz
rails-00884a59013a658082dab41da5ff41add31b8c43.tar.bz2
rails-00884a59013a658082dab41da5ff41add31b8c43.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb20
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