aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/namespaced_generators_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use escaped character in regexpyhirano552017-09-111-1/+1
|
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Stop creating ApplicationRecord on model generationLisa Ugray2017-07-241-0/+11
| | | | | | | | | | | | | | When generating models, we created ApplicationRecord in the default location if no file existed there. That was annoying for people who moved it to somewhere else in the autoload path. At this point, the vast majority of apps should have either run the upgrade script or generated a model since upgrading. For those that haven't the error message after generating a new model should be helpful: NameError: uninitialized constant ApplicationRecord To ease friction in that case, this also adds a generator for ApplicationRecord.
* 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
|
* applies new string literal convention in railties/testXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Generate application_record.rb file before model fileWojciech Wnętrzak2016-06-081-6/+6
| | | | | | Previously model file was generated first, which resulted in inheriting from `ActiveRecord::Base`, but since application_record.rb is generated as well, it should already be used.
* Update test generators to use ActionDispatch::IntegrationTestAbdelkader Boudih2015-12-151-4/+4
| | | | | | | | | | | | In Rails 5.1 `ActionController::TestCase` will be moved out of Rails into it's own gem. Please use `ActionDispatch::IntegrationTest` going forward. This changes the generators to use `ActionDispatch::IntegrationTest` and the required URL setup (rather than symbols) for each of the controller actions. Updated fix to #22076.
* Ensure generated migrations include a version numberMatthew Draper2015-12-151-4/+4
|
* Revert "Merge pull request #22569 from seuros/remove-test-case"eileencodes2015-12-131-4/+4
| | | | | | | | | This reverts commit 9712a7a12b7f9e4dcef751ceda8a73c3f4beb11f, reversing changes made to 3e65c3d3886336e9145438cdeacaf4ebec6a48b8. Reverting because this caused test failures and while we have a followup branch there is still one failure that happens randomly and isn't straight forward to fix.
* Controller generators should be creating IntegrationTest stubs instead of ↵Abdelkader Boudih2015-12-131-4/+4
| | | | ControllerTest
* fix application_controller require_dependency path generated by api scaffold ↵yuuji.yaginuma2015-11-081-0/+24
| | | | | | | | | generator In the app generator, regardless of the namespace, it is adapted to read the same `application_controller.rb`, modified to api generator also be the same behavior. ref 686966a1861e6761021d45f6795de753e8a62216, 06ac63b4c602e4b26cb3bfbf0dfd2bed8b00e786
* fix application_controller require_dependency path generated by the scaffold ↵yuuji.yaginuma2015-09-201-0/+1
| | | | | | | generator This is follow up to #6643. In #6643, the controller generator only had been fixed, in this commit to fix the scaffold generator.
* Merge pull request #18393 from y-yagi/fix_mailerRafael Mendonça França2015-02-181-5/+5
|\ | | | | follow up to #18074
| * follow up to #18074yuuji.yaginuma2015-01-081-5/+5
| | | | | | | | | | * ignore mailer suffix when generate test files * add mailer suffix to view files
* | Add _mailer suffix to i18n pathCarlos Souza2015-01-081-2/+2
|/ | | | | | For mailers created via generators Follow up to #18074
* Add mailer suffix to generated files and classesCarlos Souza2015-01-061-5/+5
| | | | | Following the same naming convention used in controllers and jobs.
* Add tests which were incorrectly removed.Guo Xiang Tan2014-11-251-0/+2
|
* Creates an ApplicationMailer and layout by default, including html and body ↵Andy Jeffries2014-11-211-4/+2
| | | | tags to reduce spam score
* A few more tests asserting the presence of helper test stubsDavid Heinemeier Hansson2014-08-031-7/+0
|
* single quotes for controller generated routesCristian Mircea Messel2014-01-141-1/+1
| | | | | | | | | | Write routes in route.rb with single quotes get 'welcome/index' instead of get "welcome/index"
* Fix typo in generators test helpr -> helper [ci skip]Prathamesh Sonpatki2013-08-301-1/+1
|
* Remove observers and sweepersRafael Mendonça França2012-11-281-21/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Refactor generators tests to include test helpers in the parent classCarlos Antonio da Silva2012-11-271-4/+3
|
* Remove some line breaks between array items that make the assert file tests ↵Carlos Antonio da Silva2012-11-041-21/+9
| | | | harder to read
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-3/+3
|
* Update test locationsMike Moore2012-10-091-25/+25
| | | | | | | | | | | | | | Change the default test locations to avoid confusion around the common testing terms "unit" and "functional". Add new rake tasks for the new locations, while maintaining backwards compatibility with the old rake tasks. New testing locations are as follows: app/models -> test/models (was test/units) app/helpers -> test/helpers (was test/units/helpers) app/controllers -> test/controllers (was test/functional) app/mailers -> test/mailers (was test/functional)
* Fixed generated whitespace in routes when using namespaced resource.Jeremy Walker2012-09-291-2/+74
|
* Fixed generating namespaced table_name_prefix in enginesWojciech Wnętrzak2012-07-061-1/+1
|
* Fixed the application_controller require_dependency path generated by the ↵Fred Wu2012-06-061-1/+3
| | | | app generator
* Use require_dependency in generated controllersPiotr Sarnacki2012-05-221-2/+2
| | | | | | | Using require in development mode will prevent required files from reloading, even if they're changed. In order to keep namespaced application_controller reloadable, we need to use require_dependency instead of require.
* Fix generators to help with ambiguous `ApplicationController` issuePiotr Sarnacki2012-05-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In development mode, dependencies are loaded dynamically at runtime, using `const_missing`. Because of that, when one of the constants is already loaded and `const_missing` is not triggered, user can end up with unexpected results. Given such file in an Engine: ```ruby module Blog class PostsController < ApplicationController end end ``` If you load it first, before loading any application files, it will correctly load `Blog::ApplicationController`, because second line will hit `const_missing`. However if you load `ApplicationController` first, the constant will be loaded already, `const_missing` hook will not be fired and in result `PostsController` will inherit from `ApplicationController` instead of `Blog::ApplicationController`. Since it can't be fixed in `AS::Dependencies`, the easiest fix is to just explicitly load application controller. closes #6413
* Remove warning in namespaced generator testCarlos Antonio da Silva2012-05-191-1/+1
|
* Fix railties testsPiotr Sarnacki2012-05-191-1/+1
| | | | | Minitest uses different signature for assert_no_match, so we have to swap arguments.
* Namedspaced generator indent method test refactoringAlexey Vakhov2012-04-261-3/+4
|
* Merge pull request #5902 from avakhov/generator-no-indent-blank-linesJosé Valim2012-04-251-0/+8
|\ | | | | Don't indent blank lines in named base generators
| * Don't indent blank lines in named base generatorsAlexey Vakhov2012-04-251-0/+8
| |
* | Remove lonely number signAlexey Vakhov2012-04-251-1/+1
|/
* Get rid of more 1.8.x dead codeJosé Valim2011-12-201-5/+1
|
* Use RAILS_ISOLATED_ENGINE and fix namespaced generators testsStefan Sprenger2011-06-071-9/+1
|
* Move SCSS generators and default templates from Rails to the Sass Railtie ↵tomhuda2011-05-241-4/+4
| | | | | | | | (d435726312601edb3ba6f97b34f562221f72c1f8). * Sass gem registers a compressor * Sass gem registers generators for assets and scaffold * Create a default stylesheet_engine ("css") for apps that remove the Sass gem
* be sure to parenthesize the arguments when the first one is a RegExp literalAkira Matsuda2011-05-181-14/+14
| | | | | | this fixes: "warning: ambiguous first argument; put parentheses or even spaces" because: you need this to tell the parser that you're not calling :/ method (division) details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277
* Fixed failing tests for namespaced_generators_test. in 1.9.2Arun Agrawal2011-05-141-1/+5
|
* Fix more generator tests.José Valim2011-04-171-4/+4
|
* Fix scaffold generator to be aware of namespace in isolated enginePiotr Sarnacki2010-11-031-0/+153
|
* Rename namespace method to isolate_namespace.Piotr Sarnacki2010-10-091-2/+2
| | | | | | | This change caused by confusion caused by calling engine "namespaced". Stuff inside engine can be namespaced for every engine. This method is not actually namespacing anything, it's isolating engine within the given namespace.
* Add namespacing to mailer generatorPiotr Sarnacki2010-09-251-0/+52
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add namespacing for observer generatorPiotr Sarnacki2010-09-251-0/+22
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add namespace for test_unit generatorsPiotr Sarnacki2010-09-251-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Generators fix: properly check if module should be created when creating a ↵Piotr Sarnacki2010-09-251-0/+5
| | | | | | namespaced model Signed-off-by: José Valim <jose.valim@gmail.com>