aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/autoloading_fixtures
Commit message (Collapse)AuthorAgeFilesLines
* Fix constantize edge case involving prepend, autoloading and name conflictsJean Boussier2016-12-142-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the following situation: ```ruby class Bar end module Baz end class Foo prepend Baz end class Foo::Bar end ``` Running `Inflector.constantize('Foo::Bar')` would blow up with a NameError. What is happening is that `constatize` was written before the introduction of prepend, and wrongly assume that `klass.ancestors.first == klass`. So it uses `klass.ancestors.inject` without arguments, as a result a prepended module is used in place of the actual class.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-0612-12/+9
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-063-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Prevent void context warningsAndrew White2016-04-032-2/+2
| | | | | | The constant reference A::B used to trigger autoloading causes a warning to be logged about the possible use of :: in a void context so assign it to the _ variable to prevent the warnings from being triggered.
* tests the raising/throwing discards the watching stackXavier Noria2016-03-162-0/+2
|
* adds coverage for raising while autoloadingXavier Noria2016-03-161-0/+3
|
* adds coverage for throwing while autoloadingXavier Noria2016-03-151-0/+3
| | | | References #24205.
* Avoid E constant clashing with Minitest defined version.Kasper Timm Hansen2015-05-225-4/+6
| | | | | Minitest sets an E constant to an empty string to save GC time. This clashes with autoloading tests which define an E constant.
* fixes circularity check in dependenciesXavier Noria2014-10-251-0/+2
| | | | | | | | | | The check for circular loading should depend on a stack of files being loaded at the moment, rather than the collection of loaded files. This showed up indirectly in #16468, where a misspelled helper would incorrectly result in a circularity error message. References #16468
* Ensure all-caps nested consts marked as autoloadedSimon Coffey2013-08-271-0/+4
| | | | | | | | | | | | Previously, an autoloaded constant `HTML::SomeClass` would not be marked as autoloaded by AS::Dependencies. This is because the `#loadable_constants_for_path` method uses `String#camelize` on the inferred file path, which in turn means that, unless otherwise directed, AS::Dependencies watches for loaded constants in the `Html` namespace. By passing the original qualified constant name to `#load_or_require`, this inference step is avoided, and the new constant is picked up in the correct namespace.
* dependencies no longer trigger Kernel#autoload in remove_const [fixes #8213]Xavier Noria2012-11-151-0/+1
|
* detect circular constant autoloadingXavier Noria2012-08-282-0/+10
| | | | | | | Nowadays circular autoloads do not work, but the user gets a NameError that says some constant is undefined. That's puzzling, because he is normally trying to autoload a constant he knows can be autoloaded. With this check we can give a better error message.
* Fix ActiveSupport tests that depend on run orderFrancesco Rodriguez2012-08-231-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* This is for making sure const_missing is triggered without warningsSantiago Pastorino2010-07-261-1/+2
|
* Fix a bug where requires inside of autoloads were being added to the ↵wycats2010-07-263-0/+12
| | | | autoloaded_constants list, causing mayhem. [#5165 state:resolved]
* Checkin failing test case related to load once pathsNicholas Seckar2006-12-241-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test autoloading nested subclass of parent.Jeremy Kemper2006-11-162-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix warning and incorrect test triggerNicholas Seckar2006-11-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Failing test for autoloading shadowed exceptions.Jeremy Kemper2006-11-062-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update dependencies to allow constants to be defined alongside their siblings.Nicholas Seckar2006-11-012-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add forgotten fileNicholas Seckar2006-09-031-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4928 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dependencies can autoload directories of nested classes.Jeremy Kemper2006-08-165-2/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add forgotten files; Fix double loading errors.Nicholas Seckar2006-08-082-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* New dependencies implementationNicholas Seckar2006-08-081-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dependencies cleanup. Fixes #4221.Nicholas Seckar2006-03-272-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* added some (pointless) test cases to dependency loading, the more the merrierTobias Lütke2006-02-041-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3537 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added reusable reloading support through the inclusion of the Relodable ↵David Heinemeier Hansson2006-01-293-0/+6
module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de