aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/console_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add config.disable_sandbox option to Rails consolePrem Sichanugrist2019-03-231-3/+18
| | | | | | | | | | | A long-running `rails console --sandbox` could cause a database server to become out-of-memory as it's holding on to changes that happen on the database. Given that it's common for Ruby on Rails application with huge traffic to have separate write database and read database, we should allow the developers to disable this sandbox option to prevent someone from accidentally causing the Denial-of-Service on their server.
* Remove deprecated `environment` argument from the rails commandsRafael Mendonça França2019-01-171-1/+1
|
* Module#{define_method,alias_method,undef_method,remove_method} become public ↵Ryuta Kamizono2018-12-211-1/+1
| | | | | | since Ruby 2.5 https://bugs.ruby-lang.org/issues/14133
* Remove all references to slave in the codebaseRafael Mendonça França2018-09-101-10/+10
|
* Use respond_to test helpersDaniel Colson2018-01-251-3/+3
|
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Extract `assert_output` and `available_pty?` into `ConsoleHelpers` moduleyuuji.yaginuma2017-07-251-23/+8
| | | | | We define almost the same method with multiple tests. Therefore, it extract into module.
* 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
|
* Allow irb options to be passed from `rails console` commandyuuji.yaginuma2017-05-081-4/+12
| | | | Fixes #28988
* improve error message when include assertions failMichael Grosser2016-09-161-1/+1
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* applies new string literal convention in railties/testXavier Noria2016-08-061-6/+6
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-041-1/+0
| | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* Publish AS::Executor and AS::Reloader APIsMatthew Draper2016-03-021-6/+5
| | | | | | These should allow external code to run blocks of user code to do "work", at a similar unit size to a web request, without needing to get intimate with ActionDipatch.
* modify console of app method in that can use the path helpersyuuji.yaginuma2015-06-051-0/+12
|
* cleanup railties test; fix typosVipul A M2013-03-311-4/+3
|
* Don't kill the consoleJon Leighton2013-03-221-10/+2
| | | | | Use the "quit" command instead. This seems to prevents some weirdness on OS X. See #9761.
* Send SIGTERM, not SIGQUIT.Jon Leighton2013-03-221-1/+1
| | | | | | SIGTERM is the correct signal for a graceful exit. This will hopefully resolve #9761.
* Fix race condition in testJon Leighton2013-03-091-2/+2
| | | | | | | | | | | This should fix travis. For real this time! This is the one! The readpartial(100) meant that an earlier assert_stdout could chomp up the output that a later assert_stdout wants, meaning that the later assertion fails. Reading only 1 byte at a time ensure that we don't read any more than is necessary to verify the assertion.
* Bump up timeoutsJon Leighton2013-03-091-3/+3
| | | | | | This should fix travis. Also ensuring that we don't try to kill when pid is nil.
* The console --sandbox transaction should not be joinableJon Leighton2013-03-081-10/+8
| | | | Thanks @neerajdotname for noticing this bug.
* Fix rails console --sandboxJon Leighton2013-03-081-8/+74
| | | | | | I've also added a proper acceptance test which reproduced the issue. Closes #9513, #9515.
* Remove observers and sweepersRafael Mendonça França2012-11-281-17/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* convert railties to use AS::TestCaseAaron Patterson2012-01-051-1/+1
|
* Clean up the cache before the request in case we are running in the ↵José Valim2011-12-151-2/+0
| | | | reload_classes_only_on_change schema.
* Speed up development by only reloading classes if dependencies files changed.José Valim2011-12-121-1/+2
| | | | | | | | This can be turned off by setting `config.reload_classes_only_on_change` to false. Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading. Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
* Unused variable removedArun Agrawal2011-11-151-1/+0
|
* Modulize Rails console methods so that other console libraries such as Pry ↵Akira Matsuda2011-11-091-1/+1
| | | | can include these methods
* move Rails console top level methods to IRB contextAkira Matsuda2011-11-041-4/+10
|
* Solve the RAILS_ENV problem in the railties tests in a more generic wayJon Leighton2011-06-061-4/+2
|
* Fix for CI server. Dependent on RAILS_ENV=developmentArun Agrawal2011-06-061-0/+6
|
* Everyone receives app as argument for consistency.José Valim2011-05-251-3/+4
|
* Move sandbox to AR and pass the sandbox as a value. This way, other ORMs ↵José Valim2011-05-041-2/+16
| | | | like Datamapper can also have their own sandboxing in rails console.
* Small changes on AD::Reloader.José Valim2010-12-201-3/+3
|
* Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepareJohn Firebaugh2010-12-201-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-3/+2
| | | | method_missing.
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-2/+2
| | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController.
* Add console hook to force ActiveRecord::Base to be loaded when console ↵José Valim2010-07-181-3/+18
| | | | starts avoiding reference loops.
* reload! on console now works as expected. [#3822 status:resolved]José Valim2010-02-261-3/+29
|
* Move console stuff to its own directory.José Valim2010-01-231-2/+2
|
* More robust console testJoshua Peek2009-10-051-0/+52