aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/types_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-22 00:51:45 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-22 02:37:07 +0530
commit6d30002a52133bd105adb29084f4cc72b1ee847f (patch)
treee2c194d8b454b66daf4db58d770c1337d0c20399 /activerecord/test/cases/types_test.rb
parenta68a3e9af6a02c9ce18d3eec87558241095ce8fb (diff)
downloadrails-6d30002a52133bd105adb29084f4cc72b1ee847f.tar.gz
rails-6d30002a52133bd105adb29084f4cc72b1ee847f.tar.bz2
rails-6d30002a52133bd105adb29084f4cc72b1ee847f.zip
Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100e75082081e782e5cceb272885c2df7. Conflicts: activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open] This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3. Reason : It's not generating attribute methods properly, making object.column 5x slower.
Diffstat (limited to 'activerecord/test/cases/types_test.rb')
-rw-r--r--activerecord/test/cases/types_test.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/activerecord/test/cases/types_test.rb b/activerecord/test/cases/types_test.rb
deleted file mode 100644
index 403a9a6e02..0000000000
--- a/activerecord/test/cases/types_test.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require "cases/helper"
-require 'models/topic'
-
-class TypesTest < ActiveRecord::TestCase
-
- test "attribute types from columns" do
- begin
- ActiveRecord::Base.time_zone_aware_attributes = true
- attribute_type_classes = {}
- Topic.attribute_types.each { |key, type| attribute_type_classes[key] = type.class }
-
- expected = { "id" => ActiveRecord::Type::Number,
- "replies_count" => ActiveRecord::Type::Number,
- "parent_id" => ActiveRecord::Type::Number,
- "content" => ActiveRecord::Type::Serialize,
- "written_on" => ActiveRecord::Type::TimeWithZone,
- "title" => ActiveRecord::Type::Object,
- "author_name" => ActiveRecord::Type::Object,
- "approved" => ActiveRecord::Type::Object,
- "parent_title" => ActiveRecord::Type::Object,
- "bonus_time" => ActiveRecord::Type::Object,
- "type" => ActiveRecord::Type::Object,
- "last_read" => ActiveRecord::Type::Object,
- "author_email_address" => ActiveRecord::Type::Object }
-
- assert_equal expected, attribute_type_classes
- ensure
- ActiveRecord::Base.time_zone_aware_attributes = false
- end
- end
-
-end