rails/activerecord/test
Andrés Mejía 84dad446c6 Adding first_or_create, first_or_create!, first_or_new and first_or_build to Active Record.
This let's you write things like:

    User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson", :hot => true)

Related to #2420.
2011-08-30 16:33:37 -05:00
..
active_record/connection_adapters introduce a fake AR adapter for mocking database return values 2011-02-04 13:34:57 -08:00
assets move assets and models 2008-01-18 07:27:03 +00:00
cases Adding first_or_create, first_or_create!, first_or_new and first_or_build to Active Record. 2011-08-30 16:33:37 -05:00
fixtures Quote these dates to prevent intermittent test failure. Suppose local time is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved. 2011-08-04 00:38:27 +01:00
migrations in the middle of refactoring 2010-12-03 12:00:09 -08:00
models The join_nodes must be passed to the JoinDependency initializer and therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556. 2011-08-29 15:05:47 +01:00
schema use existing model for testing Base.create with #after_initialize 2011-07-24 16:36:06 -04:00
support Add require 'pathname' as it has not already been required in some circumstances 2011-06-17 14:55:34 +01:00
.gitignore 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
config.example.yml more oracle fixes 2011-06-06 15:47:29 -07:00
config.rb Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails 2008-01-21 17:20:51 +00:00