This project is archived and is in readonly mode.
backport test fixs related to SQLite from master
Reported by Xavier Noria | May 17th, 2010 @ 11:59 PM | in 2.3.6
At this moment the AR suite of 2-3-stable has a couple of failures:
1) Failure:
test_should_sum_expression(CalculationsTest)
[./test/cases/calculations_test.rb:300:in `test_should_sum_expression'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
<"636"> expected but was
<636>.
2) Failure:
test_cache_does_not_wrap_string_results_in_arrays(QueryCacheTest)
[./test/cases/query_cache_test.rb:53:in `test_cache_does_not_wrap_string_results_in_arrays'
./test/cases/../../lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
./test/cases/../../lib/active_record/query_cache.rb:9:in `cache'
./test/cases/query_cache_test.rb:52:in `test_cache_does_not_wrap_string_results_in_arrays'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run']:
<2> expected to be an instance of
<String> but was
<Fixnum>.
Perhaps they would be fixed backporting beda2d43 from master.
Comments and changes to this ticket
-
Santiago Pastorino May 20th, 2010 @ 01:11 AM
- Tag set to activerecord, patch, sqlite3
Backport here
-
Xavier Noria May 22nd, 2010 @ 07:57 PM
- State changed from new to resolved
Applied in http://github.com/rails/rails/commit/a637b5f4471be6b7284673fc719630...
Thanks!
-
Santiago Pastorino May 22nd, 2010 @ 08:51 PM
Here i'm sending a part of the backport that is important because is safer.
And a tiny refactor for master, so the code on master and 2-3-stable follows the same logic. -
Aaron Patterson May 22nd, 2010 @ 10:55 PM
+1 on both of these patches from me. They will make sure rails 2.3.x works with future versions of sqlite-ruby
-
Xavier Noria May 23rd, 2010 @ 10:20 PM
Regarding the 2.3 patch, I see a similar string comparison on line 236:
index.unique = row['unique'] != '0'
Should that one get a #to_i call as well?
Another question: these field and row values can't be nil right? You know, nil.to_i would give 0 and thus the test would pass, while now we have nil == "0", which would not.
-
Repository May 25th, 2010 @ 04:56 AM
(from [240f4e944cd90fca138aba8467456043952110cc]) SQLite: forward compatibility with future driver releases
[#4633]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/240f4e944cd90fca138aba84674560... -
Repository May 25th, 2010 @ 04:56 AM
(from [47d568ed3fc701934ebe80b276f3d8bf6951c93f]) Refactor calculation test to remove unneeded SQLite special case.
[#4633]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/47d568ed3fc701934ebe80b276f3d8...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>