diff options
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/fake_record.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/support/fake_record.rb b/test/support/fake_record.rb index 58883e43cd..ed4420a2cd 100644 --- a/test/support/fake_record.rb +++ b/test/support/fake_record.rb @@ -66,6 +66,10 @@ module FakeRecord end case thing + when DateTime + "'#{thing.strftime("%Y-%m-%d %H:%M:%S")}'" + when Date + "'#{thing.strftime("%Y-%m-%d")}'" when true "'t'" when false @@ -75,7 +79,7 @@ module FakeRecord when Numeric thing else - "'#{thing}'" + "'#{thing.to_s.gsub("'", "\\\\'")}'" end end end |