aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/loading_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Privatize unneededly protected methods in Railties testsAkira Matsuda2016-12-241-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-7/+7
|
* applies new string literal convention in railties/testXavier Noria2016-08-061-19/+19
| | | | | 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.
* remove args from assert_nothing_raised in testsTara Scherner de la Fuente2016-02-221-4/+4
|
* Prevent destructive action on production databaseschneems2016-01-071-3/+3
| | | | | | | This PR introduces a key/value type store to Active Record that can be used for storing internal values. It is an alternative implementation to #21237 cc @sgrif @matthewd. It is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large. To prevent against running tests against production we can store the "environment" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`.
* Internal test migrations use the private 'Current' versionMatthew Draper2015-12-151-2/+2
| | | | | | | | Apart from specific versioning support, our tests should focus on the behaviour of whatever version they're accompanying, regardless of when they were written. Application code should *not* do this.
* Fix failing test using custom file watcherMatthew Erhard2015-12-021-0/+2
| | | | | | | LoadingTest#test_does_not_reload_constants_on_development_if_custom_file_watcher_always_returns_false in railties/test/application/loading_test.rb is failing with: `NoMethodError: undefined method 'execute' for #<#<Class:0x00000002465a30>:0x00000001f79698>` The test creates an anonymous class to be used as a custom file watcher using `config.file_watcher=`. Per the Rails guides for Configuring, the class set to `config.file_watcher` “Must conform to ActiveSupport::FileUpdateChecker API”. Per the docs for ActiveSupport::FileUpdateChecker, the API depends on four methods: #initialize, #updated?, #execute, and #execute_if_updated. The custom file watcher in the failing test only implements the first two methods. This pull request adds #execute and #execute_if_updated to the custom file_watcher, conforming it to the ActiveSupport::FileUpdateChecker API, and passing the test.
* Fix constant in void context warningsAndrew White2015-05-051-2/+2
|
* actually autoload all second-level directories called `app/*/concerns`Alex Robbin2014-12-261-0/+29
|
* Use block instead passing as argumentRafael Mendonça França2013-07-021-1/+1
|
* Calls to the application constant have been refactored to usewangjohn2013-06-101-1/+1
| | | | | Rails.application when drawing routes and creating other configurations on the application.
* clearing autoloaded constants triggers routes reloading [Fixes #10685]Xavier Noria2013-06-061-1/+34
| | | | | Conflicts: railties/test/application/loading_test.rb
* Removing use of subclassed application constant and instead using thewangjohn2013-06-031-11/+11
| | | | | more agnostic Rails.application syntax. This means tests will be more portable, and won't rely on the existence of a particular subclass.
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-14/+14
|
* Remove all references to attr_accessible/protected and old ↵Guillermo Iguaran2012-09-161-1/+0
| | | | mass_assignment_sanitizers
* Remove default match without specified methodJose and Yehuda2012-04-241-8/+8
| | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* Rails.initialized? can be called at any time without raising an exception ↵Franck Verrot2012-03-281-0/+10
| | | | | | | | | | [Closes #2507] Changes: * `Rails.initialized=` has been removed * `Rails.initialized?` and `Rails.application.initialized?` are now * delegating to `MyApp::Application.initialized?`
* Simplify helpers handling. Ensure Metal can run AC hooks.José Valim2012-03-151-1/+30
|
* Now all the models need to explicitly declare the accessible attributesRafael Mendonça França2012-03-041-0/+1
|
* Fix railties testsPiotr Sarnacki2012-01-151-4/+4
| | | | | SchemaMigration model is loaded on rails initialization, which means that it will not be cleaned on each request.
* 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-3/+51
| | | | reload_classes_only_on_change schema.
* FileUpdateChecker should be able to handle deleted files.José Valim2011-12-131-0/+32
|
* Add config.file_watcher so developers can provide their own watchers (for ↵José Valim2011-12-131-3/+79
| | | | instance, hooking on fsevents).
* Speed up development by only reloading classes if dependencies files changed.José Valim2011-12-121-0/+1
| | | | | | | | 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
* Solve the RAILS_ENV problem in the railties tests in a more generic wayJon Leighton2011-06-061-3/+1
|
* loading_test.rb with RAILS_ENV=developmentArun Agrawal2011-06-061-0/+6
|
* Removed deprecated router API from railtiesPiotr Sarnacki2010-09-051-1/+1
|
* Ensure that Rails.application.initialize! is called only oncePiotr Sarnacki2010-09-031-0/+5
|
* Allow Engines loading its own environment file from config/environmentsPiotr Sarnacki2010-09-031-0/+17
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-3/+3
| | | | 's/[ \t]*$//' -i {} \;)
* Push a failing test for issues [#4994] and [#5003].José Valim2010-06-291-1/+14
|
* Clear DescendantsTracker on each request.José Valim2010-06-191-0/+73