diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-20 15:30:41 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-04-20 15:30:41 -0700 |
commit | 3b93ca221d3a1b777bd880c18f52010cbd56c18c (patch) | |
tree | 7b49713994125de123775102eac2655d7b29b231 /actionpack/test/template/prototype_helper_test.rb | |
parent | daab53d8c0bca1114c1485d0dcc52858a264ab9e (diff) | |
parent | 46ab7422d9ebac0d529f71a3a7c2feaf0b9d5dbd (diff) | |
download | rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.gz rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.bz2 rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 56 |
1 files changed, 19 insertions, 37 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 28e58b0a08..a84d4e72af 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -24,24 +24,11 @@ end class Author::Nested < Author; end -module BaseTest - def self.included(base) - base.send :attr_accessor, :template_format - end +class PrototypeHelperBaseTest < ActionView::TestCase + tests ActionView::Helpers::PrototypeHelper + + attr_accessor :template_format - include ActionView::Helpers::JavaScriptHelper - include ActionView::Helpers::PrototypeHelper - include ActionView::Helpers::ScriptaculousHelper - - include ActionView::Helpers::UrlHelper - include ActionView::Helpers::TagHelper - include ActionView::Helpers::TextHelper - include ActionView::Helpers::FormTagHelper - include ActionView::Helpers::FormHelper - include ActionView::Helpers::CaptureHelper - include ActionView::Helpers::RecordIdentificationHelper - include ActionController::PolymorphicRoutes - def setup @template = nil @controller = Class.new do @@ -59,25 +46,22 @@ module BaseTest end.new end -protected - - def request_forgery_protection_token - nil - end - - def protect_against_forgery? - false - end - - def create_generator - block = Proc.new { |*args| yield *args if block_given? } - JavaScriptGenerator.new self, &block - end + protected + def request_forgery_protection_token + nil + end + + def protect_against_forgery? + false + end + + def create_generator + block = Proc.new { |*args| yield *args if block_given? } + JavaScriptGenerator.new self, &block + end end -class PrototypeHelperTest < Test::Unit::TestCase - include BaseTest - +class PrototypeHelperTest < PrototypeHelperBaseTest def setup @record = @author = Author.new @article = Article.new @@ -294,9 +278,7 @@ class PrototypeHelperTest < Test::Unit::TestCase end end -class JavaScriptGeneratorTest < Test::Unit::TestCase - include BaseTest - +class JavaScriptGeneratorTest < PrototypeHelperBaseTest def setup super @generator = create_generator |