aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* do not require ruby-debug automatically. please require it if you have ↵Aaron Patterson2010-11-191-5/+0
| | | | declared it as a dependency
* converted exec to exec_query for sqliteAaron Patterson2010-11-051-3/+3
|
* ignoring certain SQL when using OracleAaron Patterson2010-11-031-0/+4
|
* exec returns an AR::ResultAaron Patterson2010-10-261-0/+8
|
* fixing tests. wooAaron Patterson2010-09-211-4/+7
|
* providing arel with column information when possible [#5392 state:resolved]Aaron Patterson2010-09-211-0/+9
|
* Move helper methods to helper.rb. Make test not depend on local TZ to pass ↵Emilio Tagua2010-09-211-0/+14
| | | | | | or fail. Signed-off-by: José Valim <jose.valim@gmail.com>
* Implemented ActiveRecord::Migrations#copy based on James Adam's ideaPiotr Sarnacki2010-09-031-0/+18
| | | | | | | | | | | | | | | ActiveRecord::Migration#copy allows to copy migrations from one place to another, changing migrations versions and adding scope to filename. For example: ActiveRecord::Migration.copy("db/migrate", :blog_engine => "vendor/gems/blog/db/migrate") will copy all migrations from vendor/gems/blog/db/migrate to db/migrate with such format: Versions of copied migrations will be reversioned to be appended after migrations that already exists in db/migrate
* restricts a test to < 1.9, and rewrites it using a proper expectationXavier Noria2010-03-131-0/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-0/+1
| | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
* activerecord test load pathsJoshua Peek2010-02-281-0/+3
|
* Revert "Fix test load paths for those not using bundler"Carlhuda2010-02-231-4/+1
| | | | | | This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818. This commit broke tests. You cannot have a file called "bundler" on the load path.
* Fix test load paths for those not using bundlerJoshua Peek2010-02-151-1/+4
|
* Get rails tests running on bundler 0.9Carl Lerche2010-01-311-8/+1
|
* Autoload AR test caseJoshua Peek2010-01-041-2/+0
|
* Don't publicize with_scope for tests since it may shadow public misuseJeremy Kemper2009-12-281-5/+0
|
* No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵José Valim2009-12-231-1/+2
| | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
* Fully expand relative rails framework paths and make sure we aren'tJoshua Peek2009-12-161-4/+2
| | | | adding any to the load path more than once.
* Avoid adding component lib/ to load path multiple timesJoshua Peek2009-11-091-1/+3
|
* Have all the tests running off a single GemfileYehuda Katz + Carl Lerche2009-10-201-7/+6
|
* Use bundled env for tests onlyJeremy Kemper2009-10-191-1/+7
|
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-2/+0
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 ↵Yehuda Katz + Carl Lerche2009-07-011-2/+0
| | | | state:resolved]
* Merge branch 'master' into active_modelJoshua Peek2009-05-291-0/+23
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb
| * replace the aaa_create_tables_test hack with loading test database schema in ↵Mislav Marohnić2009-05-171-0/+18
| | | | | | | | | | | | the test helper [#2663 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
| * Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+5
| |
* | Make Active Model test suite similar to Active RecordPratik Naik2009-03-201-1/+1
|/
* Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.Jeremy Kemper2009-02-031-9/+4
|
* Fix has_and_belongs_to_many_associations tests. #1738Pratik Naik2009-01-181-1/+1
|
* Merge branch 'master' into savepointsJeremy Kemper2009-01-101-0/+5
|\
| * Add a repair_helper to repair changes to the validations inside ↵Murray Steele2008-12-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | validations_test.rb [#674 state:resolved] Many of the tests in validations_test would add a new validation to models. However, only Topic was being reset with a fairly aggressive clearing of all validations. None of the other models being used however were recieving the same treatment. Now we use repair_validations(Topic) for the whole test case because most test cases use Topic and then the block form of repair_validations(<other_models>) inside any tests that use other models. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Require mocha >= 0.9.3, older versions don't work anymore [#1579 state:resolved]Hongli Lai (Phusion)2008-12-151-0/+1
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Merge commit 'origin/master' into savepointsHongli Lai (Phusion)2008-12-031-11/+18
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record/fixtures.rb activerecord/test/cases/defaults_test.rb
| * Add create_fixtures method for testsJeremy Kemper2008-11-151-0/+4
| |
| * Set up fixtures for AR testsJeremy Kemper2008-11-151-0/+8
| |
| * Remove fixtures from Test::Unit::TestCase. Mix in AR::TestFixtures instead.Jeremy Kemper2008-11-071-11/+6
| |
* | Fix assert_queries failures by ignoring savepoint sql.Jonathan Viney2008-11-031-1/+1
|/
* stop AR's debug.log filling with warnings about not being able to load ↵Frederick Cheung2008-09-141-0/+14
| | | | | | | | fixture classes [#1045 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ensure tests load sibling Active Support instead of a gemJeremy Kemper2008-08-251-0/+1
|
* Add assert_sql helper method to check for specific SQL output in Active ↵Gabe da Silveira2008-07-141-5/+5
| | | | | | Record test suite. [#325 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now ↵Geoff Buesing2008-03-301-8/+0
| | | | | | bundled git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add uses_tzinfo to active record tests to prevent breaking the cc.rb build ↵Michael Koziarski2008-02-061-0/+8
| | | | | | etc. Closes #11034 [mpalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require test/unit explicitly otherwise the at_exit handler doesn't get ↵Michael Koziarski2008-01-221-0/+1
| | | | | | called [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-0/+46
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de