aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/tasks/sqlite_rake_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Reduce mocking by testing value instead of method callutilum2018-07-091-4/+1
| | | | Step 2 in #33162
* Remove unnecessary Mocha stubsutilum2018-07-071-19/+4
| | | | | | Step 1 in #33162 [utilum + bogdanvlviv]
* assert_called_withutilum2018-04-261-6/+11
|
* assert_calledutilum2018-04-261-3/+3
|
* Fix `can't modify frozen String` error in `DatabaseTasks`yuuji.yaginuma2017-08-301-0/+25
| | | | | | | | | | | | | | | | | Without this, `db:structure:dump` task raises an error as follwing: ``` can't modify frozen String activerecord/lib/active_record/tasks/sqlite_database_tasks.rb:77:in `run_cmd_error' activerecord/lib/active_record/tasks/sqlite_database_tasks.rb:72:in `run_cmd' activerecord/lib/active_record/tasks/sqlite_database_tasks.rb:52:in `structure_dump' activerecord/lib/active_record/tasks/database_tasks.rb:219:in `structure_dump' activerecord/lib/active_record/railties/databases.rake:279:in `block (3 levels) in <main>' railties/lib/rails/commands/rake/rake_command.rb:23:in `block in perform' railties/lib/rails/commands/rake/rake_command.rb:20:in `perform' railties/lib/rails/command.rb:48:in `invoke' railties/lib/rails/commands.rb:18:in `<main>' ```
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Respect 'ignore_tables' in SQLite structure dumpGuillermo Iguaran2017-05-151-0/+20
|
* assert_equal takes expectation firstAkira Matsuda2016-12-261-3/+3
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-165/+165
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-40/+40
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix isolated test failures due to referencing ↵Jeremy Daer2016-04-181-0/+1
| | | | ActiveRecord::Tasks::DatabaseAlreadyExists before another test happened to make it available
* Added notice when a database is successfully created or dropped.bogdanvlviv2016-04-171-2/+28
|
* Exit with non-zero status when db:create failsJay Hayes2015-10-201-1/+1
| | | | | | | | | | | * If the create task fails for a reason other than the database already existing, processing should end. This is indicated by a non-zero exit status. * Since the backtrace is already printed to screen, we forgo printing it again by using an explicit call to `exit`. * :warning: This modifies the behavior of the db:create task slightly in that the stack trace is no longer printed by default. If the `--trace` option is used, it will print the trace _after_ the error message.
* tests, run adapter specific rake tests only for the right adapter.Yves Senn2014-07-241-0/+2
|
* Revert "Properly require database tasks so we have access to the raised ↵Rafael Mendonça França2013-11-191-1/+0
| | | | | | | | constant" This reverts commit fbcd46b1a0d255a34d29caa77bbd31c287446333. This is not needed anymore. See 7280965
* Revert "Explicitly exit with status "1" for create and drop failures"Rafael Mendonça França2013-11-191-9/+3
| | | | | | | | | | This reverts commit 22f80ae57b26907f662b7fd50a7270a6381e527e. See https://github.com/rails/rails/commit/22f80ae57b26907f662b7fd50a7270a6381e527e#commitcomment-4640676 Conflicts: activerecord/CHANGELOG.md
* Properly require database tasks so we have access to the raised constantCarlos Antonio da Silva2013-11-171-0/+1
| | | | Fix travis failures.
* Merge pull request #12531 from iamvery/database-tasks-exit-statusRafael Mendonça França2013-11-151-3/+9
|\ | | | | | | | | | | | | Explicitly exit with status "1" for create and drop task failures Conflicts: activerecord/CHANGELOG.md
| * Explicitly exit with status "1" for create and drop failuresJay Hayes2013-11-111-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A non-zero exit status allows subsequent shell commands to be chained together such as: `rake db:reset test:prepare && rspec && cap deploy` (if you're feeling brave :) * Any exceptions raised during the `create` and `drop` tasks are caught in order to print a "pretty" message to the user. Unfortunately doing so prevents rake from aborting with a non-zero exit status to the shell. * Therefore we re-raise the exceptions after the "pretty" message and re-catch them in the task. * From the task we explicitly exit with a non-zero status. This method was chosen (rather than just letting rake fail from the exception) so that the backtrace is suppressed and the output to stderr is unchanged. * Update activerecord CHANGELOG
* | Warnings removed for ruby trunkArun Agrawal2013-11-011-3/+3
|/ | | Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
* More polite cleanup for sqlite testsBogdan Gusiev2012-07-291-4/+4
|
* Extract collation tasks to database tasks.kennyj2012-07-011-0/+21
|
* Move tasks(rake) tests to under the tasks dir.kennyj2012-06-241-0/+170