aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
Commit message (Collapse)AuthorAgeFilesLines
* Generators add foreign keys on referencesDerek Prior2014-11-252-1/+46
| | | | | | | | | | | If you run a generator such as: ``` rails generate model accounts supplier:references ``` The resulting migration will now add the corresponding foreign key constraint unless the reference was specified to be polymorphic.
* Generate mailer layouts even if no action is given.Guo Xiang Tan2014-11-251-0/+2
|
* Add tests which were incorrectly removed.Guo Xiang Tan2014-11-252-0/+6
|
* Creates an ApplicationMailer and layout by default, including html and body ↵Andy Jeffries2014-11-212-10/+22
| | | | tags to reduce spam score
* Fix rbx generated Gemfile regexBenjamin Fleischer2014-10-271-1/+1
| | | | | | | | | | https://travis-ci.org/rails/rails/jobs/39190983#L460 1) Failure: AppGeneratorTest#test_psych_gem [test/generators/app_generator_test.rb:495]: Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip> http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
* Add back --skip-turbolinks and remove --skip-gemsRafael Mendonça França2014-10-261-3/+2
| | | | | | | For the most part of cases --skip-gems option just remove one line in the Gemfile. This is not worth for the complexity it adds. Closes #17196
* test, `Generators::GeneratedAttribute` with references, required, index.Yves Senn2014-10-161-0/+8
| | | | | | | | | | | | | Closes #17197. Closes #17207. `{required}` is a type modifier so it should be: user:references{required}:index and not: user:references:index{required}
* fix test_helper for mountable pluginmasarakki2014-10-131-0/+4
|
* Remove --skip-action-view option from application generatorDan Olson2014-09-241-5/+0
|
* Specify dummy app's db migrate path in plugin's test_helper.rbYukio Mizuta2014-09-161-3/+12
|
* Use dynamic path for dummy app location in plugin's test_helper.rbYukio Mizuta2014-09-141-1/+4
|
* Rails.root should be a PathnameAkira Matsuda2014-08-281-1/+1
|
* fix broken `gem` method with non-String arguments. Closes #16709.Yves Senn2014-08-271-0/+10
| | | | This was caused by #15327.
* Require ActiveJob in case a skip_xxx option is givenslainer682014-08-201-0/+1
| | | | Change position of require active_job
* Merge pull request #16062 from sgrif/sg-required-generatorsRafael Mendonça França2014-08-172-0/+56
|\ | | | | Add a `required` option to the model generator
| * Add a `required` option to the model generatorSean Griffin2014-08-082-0/+56
| | | | | | | | | | | | | | | | | | | | | | Syntax was chosen to follow the passing of multiple options to decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or `-` to be used as a separator to avoid the need for shell quoting. (I'm intending to expand this to all columns, but that's another PR. The `required` option will cause 2 things to change. `required: true` will be added to the association. `null: false` will be added to the column in the migration.
* | Change the default `null` value for timestampsSean Griffin2014-08-121-1/+1
| | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* | Fixes test for Gemfile entry changesArun Agrawal2014-08-081-6/+11
|/ | | | Broken by fbe38c9e9d4fe9f82518e8ffc1d757459b0c5f1c
* Merge pull request #16359 from skanev/after-bundle-in-rails-templatesYves Senn2014-08-061-0/+15
|\ | | | | | | | | | | | | Add an after_bundle callback in Rails templates Conflicts: railties/CHANGELOG.md
| * Add an after_bundle callback in Rails templatesStefan Kanev2014-08-031-0/+15
| | | | | | | | | | | | The template runs before the generation of binstubs – this does not allow to write one, that makes an initial commit to version control. It is solvable by adding an after_bundle callback.
* | Bring back the helpers testsJosé Valim2014-08-051-0/+39
| | | | | | | | | | Also keep the hook as other tools may rely on it, we just don't do anything by default on Rails.
* | A few more tests asserting the presence of helper test stubsDavid Heinemeier Hansson2014-08-034-12/+0
| |
* | Stubs are no longer generated for helpers, so dont test for itDavid Heinemeier Hansson2014-08-031-4/+0
| |
* | Generating stubs for helper tests is overly specific. Most helpers should ↵David Heinemeier Hansson2014-08-031-54/+0
|/ | | | simply be tested as part of the view thats using them. If you need something beyond that, you can add a test yourself for them
* Avoid defining the test if it does not need to when not on JRubyCarlos Antonio da Silva2014-07-301-2/+2
|
* Use default argument when testing generators without the need for extra argsCarlos Antonio da Silva2014-07-302-7/+7
|
* Simplify path setupCarlos Antonio da Silva2014-07-301-1/+1
|
* Simplify plugin tests a bit, leave the regexp work for minitestCarlos Antonio da Silva2014-07-301-6/+6
|
* Invert unless..else conditions on JRuby checksCarlos Antonio da Silva2014-07-302-12/+12
|
* Revert "Merge pull request #15305 from tgxworld/remove_unnecessary_require"Santiago Pastorino2014-07-302-2/+2
| | | | | | | This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d. Closes #16343
* Set Psych as the YAML engine for RubiniusRobin Dupret2014-07-231-0/+13
| | | | | | | | | | Since the rubysl-yaml gem doesn't ship with Psych by default because of its dependency on libyaml, on Rubinius, the default engine is Syck. However, if we want to be able to run the application safely on different rubies, we need to make people using Rubinius rely on Psych. See http://git.io/uuLVag for further information.
* Merge branch 'rm-remove-mocha'Rafael Mendonça França2014-07-194-0/+4
|\ | | | | | | | | Conflicts: actionpack/test/abstract_unit.rb
| * Stop requiring mocha automaticallyRafael Mendonça França2014-07-194-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* | Keep quietly and capture undeprecated on your suiteRafael Mendonça França2014-07-153-2/+10
|/
* Display notice in index.html pages in scaffolded generated viewsArun Agrawal2014-07-042-1/+9
| | | | | | | | | As we are setting notice in destroy action we should display that For more information see https://github.com/rails/rails/pull/14044 And https://github.com/rails/jbuilder/pull/191 closes #14044
* Add a '--skip-routes' flag for the Controller generator.Lucas Mazza2014-06-241-0/+7
| | | | | This way it is possible to skip the addition of the 'get "foo/bar"' routes when generating a controller.
* Add a generic --skip-gems options to generatorRafael Mendonça França2014-06-171-2/+3
| | | | | | | | | | Also remove --skip-turbolinks. This option is useful if users want to remove some gems like jbuilder, turbolinks, coffee-rails, etc that don't have specific options on the generator. rails new my_app --skip-gems turbolinks coffee-rails
* Add an option to skip installation of TurbolinksMarc Schütz2014-06-141-0/+14
|
* Merge pull request #14881 from robin850/patch-19Yves Senn2014-06-011-5/+8
|\ | | | | Swallow bundler exceptions when running tests
| * Swallow bundler exceptions when running testsRobin Dupret2014-04-271-5/+8
| | | | | | | | Let's avoid useless output when testing stuff related to Bundler.
* | `bin/setup` script to bootstrap applications.Yves Senn2014-05-301-0/+1
| |
* | Merge pull request #15327 from alexbel/replace_double_quotes_with_single_quotesYves Senn2014-05-271-7/+15
|\ \ | | | | | | | | | Replace double quotes with single quotes while adding an entry into Gemfile
| * | Replace double quotes with single quotes while adding an entry into Gemfilealexbel2014-05-261-7/+7
|/ /
* | Remove unnecessary require of Minitest.Guo Xiang Tan2014-05-242-2/+2
| | | | | | | | Minitest has already been required when calling Minitest.autorun.
* | New applications should be created with json serializerRafael Mendonça França2014-05-171-0/+36
| | | | | | | | | | | | | | | | | | | | | | The fix introduced at 75ba7425f6d235f254c00a45a58f42e88f80301a were missing this case. To fix the original issue mentioned at that commit the correct is to remove update_config_files from the command list since we should not run both config_files command when creating a new application. Tests were added to make sure everything is working fine.
* | Fix app generator test hanging.Christian Wesselhoeft2014-05-171-2/+2
| |
* | Change Gemfile’s double quotes in plugin generatorJosemar Luedke2014-05-101-4/+4
| | | | | | | | | | Since the generated application’s Gemfile is using single quotation marks, it seems fair to use it on plugin’s Gemfile as well.
* | rename `str` to `string` to fix overshadowing of variableVipul A M2014-05-071-1/+1
| |
* | skip-git should not hit git commands plugin generatorsArun Agrawal2014-05-021-8/+18
| |
* | Works correctly if git not installedRoman Shmatov2014-05-021-0/+24
|/