Neeraj Singh
a0f0943d3a
use method with_active_record_default_timezone
2013-07-29 09:07:55 +05:30
Steve Klabnik
afd4a14332
Revert "Merge pull request #9207 from dylanahsmith/mysql-quote-numeric"
...
This reverts commit 408227d9c5
, reversing
changes made to dca0b57d03
.
2013-02-27 08:46:40 -08:00
Dylan Smith
a712e08ebe
active_record: Quote numeric values compared to string columns.
2013-02-07 04:59:33 -05:00
Francesco Rodriguez
b5bb35355d
fix quoting for ActiveSupport::Duration instances
...
This patch fixes quoting for ActiveSupport::Duration instances:
# before
>> ActiveRecord::Base.connection.quote 30.minutes
=> "'--- 1800\n...\n'"
# after
>> ActiveRecord::Base.connection.quote 30.minutes
=> "1800"
Also, adds a test for type casting ActiveSupport::Duration instances.
Related to #1119 .
2012-07-04 22:39:16 -05:00
Aaron Patterson
61774e0d49
please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT
2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
2011-06-04 23:47:03 +01:00
Aaron Patterson
1f4dae9daa
do not depend on to_yaml being called, but rather depend on YAML being dumped
2011-04-13 11:41:42 -07:00
Pratik Naik
fd1cf13f74
Make serialized fixtures work again
2010-12-29 16:15:45 +00:00
Aaron Patterson
4b2e16ed24
all columns respond to string_to_binary, so no need to check respond_to?
2010-10-12 13:10:52 -07:00
Aaron Patterson
0ca9c836c0
test quoting a string with an unknown column type
2010-10-12 11:43:50 -07:00
Aaron Patterson
98cb754cd7
test quoting multibyte chars object
2010-10-12 11:38:07 -07:00
Aaron Patterson
2681dd81b4
test quoting strings with binary columns
2010-10-12 11:34:21 -07:00
Aaron Patterson
4804cb485c
test quoting a string with a float column
2010-10-12 11:30:34 -07:00
Aaron Patterson
50ad7f6561
testing quoting a string for an int column
2010-10-12 11:29:28 -07:00
Aaron Patterson
07b0b5b330
testing crazy object quoting
2010-10-12 11:25:20 -07:00
Aaron Patterson
1ba3489b75
test that dates / times / datetimes call quoted_date
2010-10-12 11:21:35 -07:00
Aaron Patterson
8b33f66891
test quoting of bigdecimals
2010-10-12 11:08:10 -07:00
Aaron Patterson
ba0a6772bb
testing floats, fixnum, and bignums
2010-10-11 17:57:47 -07:00
Aaron Patterson
8e8a5f33f4
test quoting nils, true, false, id
2010-10-11 17:52:10 -07:00
Aaron Patterson
2610bcbd94
getting quoted_time under more specific tests
2010-10-11 17:52:10 -07:00
Aaron Patterson
b9d4341bd0
starting to get the quote module under test
2010-10-11 17:52:10 -07:00