mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user