Commit Graph

2160 Commits

Author SHA1 Message Date
Neeraj Singh
8fdecaaef2 Ensure we can nest include calls [#5285 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-14 13:17:29 +02:00
José Valim
e4943e93c2 Make update_attribute behave as in Rails 2.3 and document the behavior intrinsic to its implementation. 2010-08-12 12:04:16 -03:00
Mark Turner
1049bae132 fixed indentation in test cases
Signed-off-by: wycats <wycats@gmail.com>
2010-08-11 23:55:53 -07:00
Paul Hieromnimon
007c4da9ae Raising exception if fixture file can't be found 2010-08-11 15:47:34 -07:00
Tobias Lütke
cb9295c8a1 Added test case to verify that transaction callbacks are correctly propagated to class observers 2010-08-09 21:36:06 -04:00
Brian Lopez
94cff67bd1 ignore this test for mysql2 2010-08-09 12:50:09 -07:00
Brian Lopez
ee9c950f2f bringing over latest from master 2010-08-09 12:43:49 -07:00
Aaron Patterson
e1596be323 test to ensure that respond_to? delegates to arel 2010-08-06 15:23:25 -07:00
Aaron Patterson
d082a9a2b8 sorry AR, my privates are none of your business 2010-08-06 14:53:01 -07:00
Aaron Patterson
12b3eca420 do not rely on arel class structure 2010-08-06 11:31:05 -07:00
RainerBlessing
7e4e1f0ca5 query value is converted to_s instead of to_yaml
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-08-03 21:08:43 -03:00
Neeraj Singh
db1c484c55 Dynamic finder method like scoped_by_* create methods so that
method_missing is not hit next time. Adding a test for this
scenario.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-03 10:46:09 +02:00
Neeraj Singh
807239f5a1 Making Active Record base_test.rb thinner by moving tests
to relevant files.

Number of assertions before refactoring:
2391 tests, 7579 assertions, 0 failures, 0 errors

Number of assertions after refactoring:
2391 tests, 7579 assertions, 0 failures, 0 errors

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-03 10:45:54 +02:00
Brian Lopez
d8b90114dd skip the before_type_cast_on_datetime test entirely for mysql2 2010-08-02 15:11:00 -07:00
Brian Lopez
42035fd112 move reload after touch 2010-08-02 15:10:34 -07:00
Brian Lopez
ab64499911 reload the owner model after update 2010-08-02 14:51:57 -07:00
Brian Lopez
954de9940b Merge branch 'master' into mysql2
* master:
  Bring returning back to ease migration.
  Remove duplicated logic.
  Eager loading an association should not change the count of children
  fix loading of different elements in array then int and string [#5036 state:resolved]
  Tidy up previous commit.
  test and fix collection_singular_ids= with string primary keys [#5125 state:resolved]
  Handle edge cases in the previous patch.
  Improved how AppGenerator generates the application name. It now detects the current app name whenever possible. This means that renaming the residing directory will not effect the app name generated by AppGenerator.
  ActiveModel::Errors json serialization to work as Rails 3b4 [#5254 state:resolved]
  Add missing require in ActiveSupport::HashWithIndifferentAccess [#5189 state:resolved]
  Add an internal (private API) after_touch callback. [#5271 state:resolved]
  added failing touch propagation test
  Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax
  Failing test to check for route file corruption if legacy map parameter is used. [#5263 state:open]
  Corrected the rake test:units and test:functionals description [#5251 state:committed]
  Use AS::OrderedHash when trusting in the order of the hash
  Fix label form helper to use I18n and html options, without the need of 'nil' text param:
2010-08-02 13:30:08 -07:00
Neeraj Singh
009aa8825b Eager loading an association should not change the count of children
[#4971 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-02 17:12:59 +02:00
José Valim
e1344bf504 Tidy up previous commit. 2010-08-02 16:51:08 +02:00
Robert Pankowecki
f8b53f35b9 test and fix collection_singular_ids= with string primary keys [#5125 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-02 16:41:20 +02:00
José Valim
b613c3cc7b Add an internal (private API) after_touch callback. [#5271 state:resolved] 2010-08-02 16:16:46 +02:00
Jakub Kuźma
311ea94f73 added failing touch propagation test
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-02 15:56:49 +02:00
Brian Lopez
21e81da335 update tests for mysql2 support 2010-08-02 01:37:57 -07:00
Aaron Patterson
834e304b22 reverting where() functionality, adding a test 2010-07-30 14:12:01 -07:00
Tarmo Tänav
2ea922bcec Don't increment and then decrement the same counter when re-assigning a belongs_to association
[#2786 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-07-29 22:37:20 -03:00
Jon Buda
9d109302f1 fixed joining of attributes when using find_or_create_by with multiple attributes through an association
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-07-28 00:42:48 -03:00
Santiago Pastorino
4ac3ae0685 missing requires added 2010-07-26 16:26:07 -03:00
José Valim
dd61a817de Move runtime back to the Thread.current 2010-07-26 19:14:56 +02:00
Thiago Pradi
f70c0b348d Removing unnecessary code [#5192 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-26 17:13:52 +02:00
Aaron Patterson
df95948d45 do not execute the session tests within transactions 2010-07-25 15:17:03 -07:00
Santiago Pastorino
b0b9bf3204 Object#returning removed
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-25 23:30:27 +02:00
José Valim
304c49b146 Move runtime back to connection. 2010-07-25 20:59:37 +02:00
José Valim
ff0d842454 Revert the previous three commits.
* AS::Notifications#instrument should not measure anything, it is not its responsibility;

* Adding another argument to AS::Notifications#instrument API needs to be properly discussed;
2010-07-25 20:46:42 +02:00
Aaron Patterson
b7e0408ca9 use a hash to collect optional statistics about the instrumentation 2010-07-25 11:11:23 -07:00
José Valim
d02f2d2fb2 runtime should be properly initialized. 2010-07-25 18:26:42 +02:00
Aaron Patterson
5ebc1d88d3 testing sqlbypass destroy. caching connection during destroy 2010-07-23 08:36:58 -07:00
Aaron Patterson
da37716c35 refactoring class methods to a module 2010-07-22 23:40:39 -07:00
Santiago Pastorino
227680f415 session_id is a VARCHAR 2010-07-22 13:34:27 -07:00
Aaron Patterson
38734aff20 adding a test for session save 2010-07-22 09:35:50 -07:00
Aaron Patterson
a78547a9c6 testing loaded? method and reducing funcalls 2010-07-21 16:59:23 -07:00
Aaron Patterson
87a319cd0c testing new_record? and converting to an attribute 2010-07-21 16:55:04 -07:00
Aaron Patterson
ba0d2a9ce3 starting sql bypass test, fixing create_table and drop_table! 2010-07-21 16:36:28 -07:00
Aaron Patterson
bdbe390a98 initializing instance variables 2010-07-21 16:36:28 -07:00
Subba Rao Pasupuleti
b0c7dee4f2 removing unused models from tests
[#5153 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 22:08:07 +02:00
Neeraj Singh
659e3b02ab renaming tests by removing proxy_options from names
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 15:25:39 +02:00
José Valim
7131244313 Ensure default_scope can be overwriten by association conditions. 2010-07-21 15:06:23 +02:00
Subba Rao Pasupuleti
d77c3b669c eagerly loaded association records should respect default_scope [#2931 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 15:01:40 +02:00
Neeraj Singh
992711a86b update_attribute should not update readonly attributes
[#5106 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 14:55:57 +02:00
Neeraj Singh
8bb3b634c0 Timestamp columns of HABTM join table should record timestamps
[#5161 state:resolved]
2010-07-21 14:45:36 +02:00
José Valim
01add55d6a Revert "save on parent should not cascade to child unless child changed [#3353 state:open]"
Please check Lighthouse for more information.

This reverts commit 4a0d7c1a43.
2010-07-21 14:44:46 +02:00