diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-12 14:34:13 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-12 14:34:13 -0800 |
commit | 61916e408d86d19d1659cd8042de6503aecc6c98 (patch) | |
tree | 28cbadb9b39b44d993a033af5cf254655cdab58a /spec/attributes/time_spec.rb | |
parent | 83c27c0b5e2e341307b7a160d831fb930a9552b4 (diff) | |
download | rails-61916e408d86d19d1659cd8042de6503aecc6c98.tar.gz rails-61916e408d86d19d1659cd8042de6503aecc6c98.tar.bz2 rails-61916e408d86d19d1659cd8042de6503aecc6c98.zip |
Add a bunch of specs for attribute type casting.
Diffstat (limited to 'spec/attributes/time_spec.rb')
-rw-r--r-- | spec/attributes/time_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/attributes/time_spec.rb b/spec/attributes/time_spec.rb new file mode 100644 index 0000000000..fcbe4f58e5 --- /dev/null +++ b/spec/attributes/time_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' +require 'bigdecimal' + +module Arel + describe "Attributes::Time" do + + before :all do + @relation = Model.build do |r| + r.engine Testing::Engine.new + r.attribute :created_at, Attributes::Time + end + end + + def type_cast(val) + @relation[:created_at].type_cast(val) + end + + describe "#type_cast" do + it "works" + end + end +end
\ No newline at end of file |