diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-04 23:09:58 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-04 23:09:58 +0000 |
commit | ac412ef1c7cec4cf58741f48b60368701713d850 (patch) | |
tree | 51a7c84c5bed266c510bd6700ccc4b08ba64a0f6 /actionpack/test/template | |
parent | 79455b6d45fc0568d4d5a55a95ae49faf2daefde (diff) | |
download | rails-ac412ef1c7cec4cf58741f48b60368701713d850.tar.gz rails-ac412ef1c7cec4cf58741f48b60368701713d850.tar.bz2 rails-ac412ef1c7cec4cf58741f48b60368701713d850.zip |
r2822@asus: jeremy | 2005-07-04 21:14:30 -0700
silence warnings re. class redefinitions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/active_record_helper_test.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index 853f37660f..cfbe3b62b7 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -15,13 +15,15 @@ class ActiveRecordHelperTest < Test::Unit::TestCase include ActionView::Helpers::UrlHelper include ActionView::Helpers::FormTagHelper - Post = Struct.new("Post", :title, :author_name, :body, :secret, :written_on) - Post.class_eval do - alias_method :title_before_type_cast, :title unless respond_to?(:title_before_type_cast) - alias_method :body_before_type_cast, :body unless respond_to?(:body_before_type_cast) - alias_method :author_name_before_type_cast, :author_name unless respond_to?(:author_name_before_type_cast) + silence_warnings do + Post = Struct.new("Post", :title, :author_name, :body, :secret, :written_on) + Post.class_eval do + alias_method :title_before_type_cast, :title unless respond_to?(:title_before_type_cast) + alias_method :body_before_type_cast, :body unless respond_to?(:body_before_type_cast) + alias_method :author_name_before_type_cast, :author_name unless respond_to?(:author_name_before_type_cast) + end + Column = Struct.new("Column", :type, :name, :human_name) end - Column = Struct.new("Column", :type, :name, :human_name) def setup @post = Post.new |