Andrew White
5d655aabcb
Pass mass-assignment options to nested models - closes #1673 .
2011-06-13 13:02:51 +01:00
Andrew White
987afa583e
Rename tests to reflect associations
2011-06-13 10:01:38 +01:00
Jon Leighton
86bbba1ffb
Add support for using an ARCONFIG environment variable to specify the location of the config.yml file for running the tests
2011-06-12 19:08:16 +01:00
Jon Leighton
15e289147e
Oops, this should have been in the last commit ⚡
2011-06-12 19:05:29 +01:00
Jon Leighton
c52520166b
Make assert_no_queries literally enforce that there are no queries. As in, not a single line of SQL should be sent to the database, not even stuff that is ignored by assert_queries. The argument being that if you write assert_no_queries, you really do not want there to be any queries.
2011-06-12 18:50:24 +01:00
Jon Leighton
232c66a1ba
If we're going to use a global variable, let's at least namespace it
2011-06-12 18:38:39 +01:00
Jon Leighton
14e6bbb149
Refactor tests to be less brittle
2011-06-12 18:19:21 +01:00
Jon Leighton
de01a64102
Move BEGIN and COMMIT into IGNORED_SQL rather than having them as a special case in assert_queries
2011-06-12 18:19:21 +01:00
benedikt
fa8dfad765
Don't wrap operations on collection associations in transactions when they are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database.
2011-06-12 18:19:21 +01:00
Jon Leighton
4b371b602b
Print out information about whether the identity map is on or off when running unit tests
2011-06-09 20:20:51 +01:00
Sebastian Martinez
9af4e803ec
Remove unused 'y' variable.
2011-06-08 23:13:59 -03:00
Raimonds Simanovskis
e58ee1dccc
Do not hardcode :id as it was ignored by mass assignment filter
...
As a result test was failing on Oracle where ids are assigned by default from 1000
2011-06-08 11:56:23 +03:00
Jon Leighton
7d1782a2c1
Allow polymorphic has_one to work when the association is set before the owner has been saved. Fixes #1524 .
2011-06-08 00:32:49 +01:00
Jon Leighton
4f5f6a3257
When you add a record to a polymorphic has_one, you should be able to access the owner from the associated record
2011-06-08 00:32:49 +01:00
Alexandr Zykov
4c3ec9889a
fix typo
2011-06-08 03:31:33 +06:00
Dmitriy Kiriyenko
8aabefb0b7
This way asserting that updated_at was changed in touch look more obvious.
2011-06-07 18:42:40 +01:00
Dmitriy Kiriyenko
7c1f73c843
Do not use default_scope in ActiveRecord::Persistence#touch.
2011-06-07 18:42:40 +01:00
Jon Leighton
ad9586bf38
Fix a couple of helper requires that were missed. This was causing the tests to fail to run on 1.8.7.
2011-06-07 08:35:55 +01:00
José Valim
e32e8ed966
Merge pull request #1474 from ganeshkumar/update_column_changes
...
added tests for update_column
2011-06-07 00:14:42 -07:00
Aaron Patterson
8392f10b58
set the environment variable from the rake file
2011-06-06 16:51:45 -07:00
Aaron Patterson
424cf3b050
more oracle fixes
2011-06-06 15:47:29 -07:00
Aaron Patterson
517ca8771c
do not muck with the load path, that is the test task responsibility
2011-06-06 15:47:26 -07:00
Aaron Patterson
841d29639b
updating configs for oracle
2011-06-06 15:47:22 -07: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
523c7c2330
Fix adapter_test.rb to make no assumptions about the database name
2011-06-05 11:28:17 +01:00
Jon Leighton
3b7d100b51
Fix typo
2011-06-05 11:28:17 +01:00
José Valim
b5b31658bc
Merge pull request #1462 from arunagw/test_added_for_namedscope
...
Test added for namedscope target.
2011-06-05 00:12:05 -07:00
Jon Leighton
75e56101d4
Bring back oracle specific crap
2011-06-04 23:49:54 +01: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
ganesh
5f66f7a9a2
added more tests for update_column
2011-06-04 00:04:59 +05:30
Arun Agrawal
0695eb6dac
Test added for namedscope target.
2011-06-03 08:28:00 +05:30
Jon Leighton
f064664de7
Fix broken test. You know, the merge button will be the end of us...
2011-06-01 23:13:40 +01:00
Aaron Patterson
63665f6c9f
Merge pull request #1385 from smartinez87/drop
...
#drop_table accepts no options now.
2011-06-01 10:52:41 -07:00
Arun Agrawal
7d447c4726
Adding comment
2011-06-01 18:50:43 +01:00
Vishnu Atrai
230f788759
AttributeMethodTest test fix #jruby
2011-06-01 18:50:26 +01:00
Brian Mathiyakom
1e43bd9f35
Fix issue #1272
...
Set reverse_order_value when asked to reverse_order().
Do the actual reversal in build_arel.
2011-06-01 18:29:29 +01:00
Jon Leighton
69c52b0e9a
Add missing require to fix the CI
2011-06-01 08:58:50 +01:00
Prem Sichanugrist
2aaeac9a0a
Isolated PostgreSQL test into PostgreSQL folder
2011-05-31 20:56:07 -04:00
Andrew White
cf3364a03c
Raise NameError instead of ArgumentError in ActiveSupport::Dependencies
...
ActiveSupport::Dependencies now raises NameError if it finds an existing
constant in load_missing_constant. This better reflects the nature of
the error which is usually caused by calling constantize on a nested constant.
Closes #1423
2011-06-01 01:16:20 +01:00
Josh Kalderimis
eb7ef2ccd6
added an alias for new to build to the AR collection proxy, this corrects an issue where the collection proxies were not consistent
2011-06-01 00:01:35 +01:00
Jon Leighton
fbe012e92d
Ensure that calculations properly override the select value even if it's set in the default scope. Fixes #1395 .
2011-05-31 21:12:20 +01:00
Erik Fonselius
a5806fa409
Failing test for aggregating on default_scope with select
2011-05-31 20:47:30 +01:00
Farley Knight
aa316e27b7
Tests for issue #1360
2011-05-31 19:47:34 +01:00
Jon Leighton
0bb8429e71
Reduce test noise
2011-05-31 18:18:14 +01:00
Arun Agrawal
e04f2c1d42
Opening class CascadedEagerLoadingTest at once.
2011-05-31 12:35:37 +05:30
Sebastian Martinez
802555a5cd
#drop_table accepts no options now.
2011-05-28 18:19:32 -03:00
Akira Matsuda
9fb51e76fd
Disable IdentityMap by default for ActiveRecord testing
...
because enabling IM by default will possibly hide some bugs on 3.1 default behavior
2011-05-28 09:08:13 +09:00
Aaron Patterson
2a9b3abe19
Merge pull request #1229 from workmad3/master
...
Fix for Issue #1205
2011-05-27 14:34:05 -07:00
Aaron Patterson
8628948e2a
fixing test for mysql2
2011-05-27 11:44:14 -07:00
Aaron Patterson
d1c74706c3
adding a test for #1322
2011-05-26 16:16:57 -07:00