Permalink
Browse files

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
  • Loading branch information...
1 parent 79455b6 commit ac412ef1c7cec4cf58741f48b60368701713d850 @jeremy jeremy committed Jul 4, 2005
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../abstract_unit'
-Customer = Struct.new("Customer", :name)
+silence_warnings { Customer = Struct.new("Customer", :name) }
module Fun
class GamesController < ActionController::Base
@@ -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

0 comments on commit ac412ef

Please sign in to comment.