aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit
Commit message (Collapse)AuthorAgeFilesLines
* Fix API controller tests by assigning them the encoding typePrathamesh Sonpatki2016-06-071-5/+5
| | | | | | | - Fixes #25183. - The `as: :json` feature was added in https://github.com/rails/rails/pull/21671 and recommended to use for JSON endpoints so let's use it by default for API controller tests.
* Redirects are to urls, not pathsDavid Heinemeier Hansson2016-05-281-3/+3
|
* Remove redundant regexp escapes in generatorsGadzhi Gadzhiev2016-03-081-1/+1
|
* set association name to generated fixtures if attribute is referenceyuuji.yaginuma2016-02-061-1/+1
| | | | | | | It has been changed to require `belongs_to` by default in Rails 5. Therefore in order to pass the controller test, have association of set to fixtures. Fixes #23384
* make generated controller test work correctlyyuuji.yaginuma2016-01-061-1/+1
| | | | | | | Since the `#file_name` that not consideration for the namespace, if generate a controller with a namespace, not the correct url helper generation, it had become an error to run the test. Modified to generate the correct url helper, even if it is produced a namespace with controller.
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-12-201-2/+2
|\
| * remove extra spaces in fixtures doc partGaurav Sharma2015-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | ``` Every time when a fixture generate, it’s also generating improper doc. one: {} # column: value # two: {} # column: value ```
* | fix indentation of generated controller testyuuji.yaginuma2015-12-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` # before module Bukkits class UsersControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @user = bukkits_users(:one) end ``` ``` # after module Bukkits class UsersControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @user = bukkits_users(:one) end ```
* | Deal with leading CR when its not a mountable engineDavid Heinemeier Hansson2015-12-171-1/+1
| |
* | Update test generators to use ActionDispatch::IntegrationTestAbdelkader Boudih2015-12-153-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "Merge pull request #22569 from seuros/remove-test-case"eileencodes2015-12-133-17/+16
| | | | | | | | | | | | | | | | | | 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-133-16/+17
|/ | | | ControllerTest
* make generated scaffold functional tests work inside API enginesyuuji.yaginuma2015-08-091-1/+4
| | | | | * set engine's route in setup * use fixture with engine namespace
* fix NoMethodError that occurs when generating scaffold inside full mode engineyuuji.yaginuma2015-06-283-3/+3
|
* assigns was removed from RailsRafael Mendonça França2015-06-111-1/+0
|
* Make Rails API apps return the full resource on updateSantiago Pastorino2015-06-111-1/+1
|
* Fix class_option description for api generatorsSantiago Pastorino2015-06-111-1/+1
|
* API apps scaffold generator generates an apropriate controllerSantiago Pastorino2015-06-112-1/+46
|
* Merge pull request #20387 from y-yagi/fix_engine_generated_controller_testYves Senn2015-06-023-1/+19
|\ | | | | | | set engine's route in the functional test is generated in the engine
| * add engine's namespace to fixture nameyuuji.yaginuma2015-05-312-1/+10
| |
| * set engine's route in the functional test is generated in the engineyuuji.yaginuma2015-05-312-0/+9
|/
* Removed `assigns` from functional_test templatesPrathamesh Sonpatki2015-05-021-3/+2
| | | | | - Based on DHH's suggestion about deprecating `assigns` in https://github.com/rails/rails/pull/18305#issuecomment-68605166.
* respect `pluralize_table_names` when generate fixture file. fixes #19519yuuji.yaginuma2015-03-271-1/+1
|
* add mailer suffix to comments for email previewsyuuji.yaginuma2015-03-151-2/+2
|
* Merge pull request #18393 from y-yagi/fix_mailerRafael Mendonça França2015-02-182-1/+6
|\ | | | | follow up to #18074
| * follow up to #18074yuuji.yaginuma2015-01-082-1/+6
| | | | | | | | | | * ignore mailer suffix when generate test files * add mailer suffix to view files
* | scaffold controller_test template should use kwargs. refs #18323.Yves Senn2015-01-301-5/+5
|/ | | | This prevents a flood of warnings when generating a new scaffold.
* Add mailer suffix to generated files and classesCarlos Souza2015-01-063-6/+6
| | | | | Following the same naming convention used in controllers and jobs.
* Generated fixtures won't use parent_id when generated with parent:referencesPablo Olmos de Aguilera Corradini2015-01-021-0/+2
| | | | Fix #18301
* correct filename for jobs testsAbdelkader Boudih2014-09-281-1/+1
|
* Change ActiveJob test directory to "test/jobs"yuuji.yaginuma2014-09-131-1/+1
|
* Remove extra newline from ActiveJob test templateyuuji.yaginuma2014-09-091-1/+0
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-1/+0
|
* [ActiveJob] TestCaseAbdelkader Boudih2014-09-021-1/+3
|
* [ActiveJob] Add hook for test_framework and test templatesAbdelkader Boudih2014-08-222-0/+22
|
* Bring back the helpers testsJosé Valim2014-08-051-0/+9
| | | | | Also keep the hook as other tools may rely on it, we just don't do anything by default on Rails.
* Generating stubs for helper tests is overly specific. Most helpers should ↵David Heinemeier Hansson2014-08-032-19/+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
* Add comments with urls for email previewsAndrew White2013-12-221-0/+2
|
* Add mailer previews feature based on mail_view gemAndrew White2013-12-172-1/+19
|
* Revert "Rename not Ruby files to .tt"Santiago Pastorino2013-12-106-0/+0
| | | | | | This reverts commit bd360ad3c1d59273bf96ea01b17cf04285816dc2. Reverting this for now until we fix the Thor related issue
* Rename not Ruby files to .ttSantiago Pastorino2013-12-106-0/+0
|
* Added generated unit test for generator generator and new test:generators ↵Josef Šimánek2013-07-162-0/+42
| | | | rake task included in test:all rake task.
* Update a broken link into the fixtures' templateRobin Dupret2013-06-291-1/+1
|
* Add support for generate scaffold password:digestSam Ruby2013-03-132-10/+12
| | | | | | | | | | * adds password_digest attribute to the migration * adds has_secure_password to the model * adds password and password_confirmation password_fields to _form.html * omits password entirely from index.html and show.html * adds password and password_confirmation to the controller * adds unencrypted password and password_confirmation to the controller test * adds encrypted password_digest to the fixture
* extract PerformanceTest into rails-performance_tests gemYves Senn2013-01-102-25/+0
|
* test PATCH method for update action in generated scaffold controller test ↵Akira Matsuda2013-01-031-1/+1
| | | | rather than PUT
* Add active_support/testing/autorunRafael Mendonça França2012-12-311-1/+1
| | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* quote column names in generated fixture filesYves Senn2012-12-262-4/+16
|
* Make sure that no extra spaces are created with a non-polymorphicRafael Mendonça França2012-12-101-2/+6
| | | | attributes
* Add GeneratedAttribute#column_name to get the name of the column in theRafael Mendonça França2012-12-101-2/+2
| | | | database