diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
commit | f915f9e33903ee474920e24ad12a1625f2ef1c52 (patch) | |
tree | 5b6d41e8a809aeaadbc2c0be59603f5f58b16231 /activerecord/test/cases/types/object_test.rb | |
parent | b17e358e3df34c03019e357f693611618092e1d6 (diff) | |
parent | 8ff2fb6f3aa6140f5a8bd018d5919a8a1e707cda (diff) | |
download | rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.gz rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.bz2 rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.zip |
Merge branch 'master' into app
Conflicts:
railties/lib/rails/application.rb
Diffstat (limited to 'activerecord/test/cases/types/object_test.rb')
-rw-r--r-- | activerecord/test/cases/types/object_test.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/activerecord/test/cases/types/object_test.rb b/activerecord/test/cases/types/object_test.rb deleted file mode 100644 index f2667a9b00..0000000000 --- a/activerecord/test/cases/types/object_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "cases/helper" - -class ObjectTest < ActiveRecord::TestCase - - def setup - @column = ActiveRecord::ConnectionAdapters::Column.new('name', '', 'date') - @object = ActiveRecord::Type::Object.new(@column) - end - - test "typecast with column" do - date = Date.new(2009, 7, 10) - assert_equal date, @object.cast('10-07-2009') - assert_equal nil, @object.cast('') - - assert_equal date, @object.precast(date) - end - - test "cast as boolean" do - assert_equal false, @object.boolean(nil) - assert_equal false, @object.boolean('false') - assert_equal true, @object.boolean('10-07-2009') - end - -end |