aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/active_record_helper_test.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-07-20 16:57:23 -0300
committerEmilio Tagua <miloops@gmail.com>2009-07-20 16:57:23 -0300
commit9a28bd787660b08aae36155066e61d3608d0b4dd (patch)
tree2d10dd32ad28cc070c3d142c45d6a35fcd5ae43e /actionpack/test/template/active_record_helper_test.rb
parentb326faef0936e5a845d1f6eb9ed2200babfd05f8 (diff)
parent37658f15bb88e054635a496327a4a82bb50fd5d5 (diff)
downloadrails-9a28bd787660b08aae36155066e61d3608d0b4dd.tar.gz
rails-9a28bd787660b08aae36155066e61d3608d0b4dd.tar.bz2
rails-9a28bd787660b08aae36155066e61d3608d0b4dd.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/template/active_record_helper_test.rb')
-rw-r--r--actionpack/test/template/active_record_helper_test.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb
index e1be048838..c1bbdae8fb 100644
--- a/actionpack/test/template/active_record_helper_test.rb
+++ b/actionpack/test/template/active_record_helper_test.rb
@@ -1,22 +1,20 @@
require 'abstract_unit'
class ActiveRecordHelperTest < ActionView::TestCase
- tests ActionView::Helpers::ActiveRecordHelper
+ tests ActionView::Helpers::ActiveModelHelper
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)
+ class Post < Struct.new(:title, :author_name, :body, :secret, :written_on)
+ extend ActiveModel::APICompliant
end
- User = Struct.new("User", :email)
- User.class_eval do
- alias_method :email_before_type_cast, :email unless respond_to?(:email_before_type_cast)
+ class User < Struct.new(:email)
+ extend ActiveModel::APICompliant
end
- Column = Struct.new("Column", :type, :name, :human_name)
+ class Column < Struct.new(:type, :name, :human_name)
+ extend ActiveModel::APICompliant
+ end
end
class DirtyPost