aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/paths_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-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
|
* Raise when using a bad symlinkschneems2017-03-141-0/+20
| | | | | | | | | | | | | There was a case where a dev made a symlink that worked on some machines and not on others. The issue manifested itself on a machine with `RAILS_ENV=staging` as the had their `config/environments/staging.rb` symlinked to another config file. The behavior was very hard to track down. Current behavior: If you use a bad symlink in a file, you get no warnings or failures or anything. If you have a bad symlink it just ignores the file as if it didn't exist (`File.exist?` returns false for a bad symlink). Patch behavior: With this patch when a file is not present we check if a symlink exists. If it does, that indicates there is a bad symlink and we should raise ``` File "config/environments/staging.rb" is a symlink that does not point to a valid file ```
* improve error message when include assertions failMichael Grosser2016-09-161-12/+12
| | | | | | 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
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies new string literal convention in railties/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Reload I18n locales in developmentKir Shatrov2015-08-101-0/+13
|
* Remove use of mocha in the railties path testsRoque Pinel2015-05-181-59/+88
|
* Stop requiring mocha automaticallyRafael Mendonça França2014-07-191-0/+1
| | | | | | | | | | | We are planning to remove mocha from our test suite because of performance problems. To make this possible we should stop require mocha on ActionSupport::TestCase. This should not affect applications since users still need to add mocha to Gemfile and this already load mocha. Added FIXME notes to place that still need mocha removal
* Fix some failing tests for Rails::PathsRobin Dupret2013-11-011-1/+1
| | | | | Since we are not using the File.exists? alias which raises a warning on current ruby trunk, few stubs are wrong.
* Fix typos: the indefinite articles(a -> an)SUGINO Yasuhiro2013-09-131-1/+1
|
* Revert "Deprecate the `eager_load_paths` configuration"Andrew White2013-02-191-24/+32
| | | | | | | | | | | Because of the possibility of lib being unintentionally eager loaded it's been agreed that we'll leave autoload paths and eager load paths separate for Rails 4.0. This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931. Conflicts: railties/CHANGELOG.md
* Deprecate the `eager_load_paths` configurationAndrew White2013-01-241-32/+24
| | | | | | | | | | Since the default in Rails 4.0 is to run in 'threadsafe' mode we need to eager load all of the paths in `autoload_paths` so we alias `eager_load_paths` to it. This may have unintended consequences if you have added 'lib' to `autoload_paths` such as loading unneeded code or code intended only for development and/or test environments. If this applies to your application you should thoroughly check what is being eager loaded.
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-14/+14
|
* Fix failing test related to persist glob when replacing a pathCarlos Antonio da Silva2012-07-011-1/+1
| | | | Introduced in pull request #6910, merged in 2ee3fa1a48513a2c42833e2e1f60fe03769bc295
* Merge pull request #6910 from mulder/fix_path_globJosé Valim2012-07-011-0/+7
|\ | | | | Persist glob when replacing a path
| * Persist glob when replacing a pathNicholas Mulder2012-06-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Rails::Paths::Root's []= is used to replace a path it should persist the previous path's glob. Without passing the glob along we get gnarly bugs when trying to wire up things like engines. module FooEngine class Engine < ::Rails::Engine isolate_namespace FooEngine config.paths['config/initializers'] = "lib/foo_engine/initializers" end end ## Example of behaviour before this commit. # # Before the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb" # After the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => nil ## Example of behaviour after this commit. # # Before the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb" # After the initializer override: >> FooEngine::Engine.config.paths["config/initializers"].glob => "**/*.rb"
* | Revert "Allow loading external route files from the router"José Valim2012-06-291-2/+0
|/ | | | | | | | | | | | | | This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b. Usage of this feature did not reveal any improvement in existing apps. Conflicts: actionpack/lib/action_dispatch/routing/mapper.rb guides/source/routing.textile railties/lib/rails/engine.rb railties/lib/rails/paths.rb railties/test/paths_test.rb
* Fixes build 4008.1Waseem Ahmad2012-05-251-2/+2
| | | | | | | | This fixex build 4008.1[1] because of the changes made in 4001835db00ce44cb75bca33ec02cd76b8ccc790 [1] http://travis-ci.org/#!/rails/rails/jobs/1429671
* Allow loading external route files from the routerJose and Yehuda2012-04-251-0/+2
| | | | | | | | | This feature enables the ability to load an external routes file from the router via: draw :filename External routes files go in +config/routes+. This feature works in both engines and applications.
* Drop Paths::Root initializer check of #path as it isn't checked in the ↵Ben Woosley2012-03-291-4/+0
| | | | #path= or anywhere else
* favor composition over inheritanceAaron Patterson2012-03-261-1/+1
|
* Removing Deprecated Path API testsGuillermo Iguaran2011-05-241-53/+0
|
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-119/+149
| | | | method_missing.
* Add skip_eager_load!, skip_autoload! and friends to path objects.José Valim2010-07-171-2/+22
|
* A few changes were done in this commit:José Valim2010-06-281-28/+28
| | | | | | * Added :autoload to engines path API and redefine usage to be in sync with 6f83a5036d8a9c3f8ed7; * Do not autoload code in *lib* for applications (now you need to explicitly require them). This makes an application behave closer to an engine (code in lib is still autoloaded for plugins); * Always autoload code in app/ for engines and plugins. This makes engines behave closer to an application and should allow us to get rid of the unloadable hack required when controllers inside engines inherit from ApplicationController;
* Solve some pendencies.José Valim2010-01-241-0/+1
|
* Move configuration to subfolders.José Valim2010-01-231-6/+6
|
* First steps into making Plugin < Engine.José Valim2010-01-231-0/+7
|
* Got tests working once again.José Valim2010-01-221-6/+1
|
* Update routes.rb template to use App nameJoshua Peek2009-12-211-2/+1
|
* Make rails configuration's path object's root lazyYehuda Katz + Carl Lerche2009-10-141-0/+21
|
* Reapply Rails::Application::Path tweaksYehuda Katz + Carl Lerche2009-07-061-4/+88
| | | | | Reapplies: a4bdc00fec623f72592e663e6d7830eea0bc6ea4 3c1dab72259d01c6335bf359d7f9b3af69d45bb4
* Revert "Modify the Rails::Application::Path object to allow for more concise ↵Pratik Naik2009-07-031-88/+4
| | | | | | | | path definition." This reverts commit 913bb2f4c2feb79dcbc9ed2c0fb1ef6d436f7d02. Reason : The server does not start
* Modify the Rails::Application::Path object to allow for more concise path ↵Yehuda Katz + Carl Lerche2009-07-021-4/+88
| | | | definition.
* Add #concat to Rails::Application::PathCarl Lerche2009-06-301-0/+7
|
* Starting to replace scattered path configuration settings with the path objectYehuda Katz + Carl Lerche2009-06-261-4/+17
|
* Finished a first stab at the Rails application path object.Yehuda Katz + Carl Lerche2009-06-261-64/+40
|
* Update paths to support an explicit root and multiple paths per categoryYehuda Katz + Carl Lerche2009-06-261-29/+91
|
* Simple initial Paths implYehuda Katz + Carl Lerche2009-06-261-0/+68