Mercurial > hg > soundsoftware-site
annotate test/helper_testcase.rb @ 892:f171d5dfaef0 bug_67
Close obsolete branch bug_67
author | Chris Cannam |
---|---|
date | Wed, 09 Feb 2011 12:16:25 +0000 |
parents | 513646585e45 |
children | cbb26bc654de |
rev | line source |
---|---|
Chris@0 | 1 # Re-raise errors caught by the controller. |
Chris@0 | 2 class StubController < ApplicationController |
Chris@0 | 3 def rescue_action(e) raise e end; |
Chris@0 | 4 attr_accessor :request, :url |
Chris@0 | 5 end |
Chris@0 | 6 |
Chris@0 | 7 class HelperTestCase < ActiveSupport::TestCase |
Chris@0 | 8 |
Chris@0 | 9 # Add other helpers here if you need them |
Chris@0 | 10 include ActionView::Helpers::ActiveRecordHelper |
Chris@0 | 11 include ActionView::Helpers::TagHelper |
Chris@0 | 12 include ActionView::Helpers::FormTagHelper |
Chris@0 | 13 include ActionView::Helpers::FormOptionsHelper |
Chris@0 | 14 include ActionView::Helpers::FormHelper |
Chris@0 | 15 include ActionView::Helpers::UrlHelper |
Chris@0 | 16 include ActionView::Helpers::AssetTagHelper |
Chris@0 | 17 include ActionView::Helpers::PrototypeHelper |
Chris@0 | 18 |
Chris@0 | 19 def setup |
Chris@0 | 20 super |
Chris@0 | 21 |
Chris@0 | 22 @request = ActionController::TestRequest.new |
Chris@0 | 23 @controller = StubController.new |
Chris@0 | 24 @controller.request = @request |
Chris@0 | 25 |
Chris@0 | 26 # Fake url rewriter so we can test url_for |
Chris@0 | 27 @controller.url = ActionController::UrlRewriter.new @request, {} |
Chris@0 | 28 |
Chris@0 | 29 ActionView::Helpers::AssetTagHelper::reset_javascript_include_default |
Chris@0 | 30 end |
Chris@0 | 31 |
Chris@0 | 32 def test_dummy |
Chris@0 | 33 # do nothing - required by test/unit |
Chris@0 | 34 end |
Chris@0 | 35 end |