aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8705 from amparo-luna/change_update_attributes_to_updateGuillermo Iguaran2013-01-032-3/+3
|\ | | | | Rename update_attributes method to update
| * Updating default application templates to use update instead of ↵Amparo Luna + Guillermo Iguaran2013-01-032-3/+3
| | | | | | | | update_attributes
* | test PATCH method for update action in generated scaffold controller test ↵Akira Matsuda2013-01-032-4/+4
| | | | | | | | rather than PUT
* | Restore original remote_ip algorithm.Andre Arko2013-01-021-1/+1
|/ | | | | | | | | | | Proxy servers add X-Forwarded-For headers, resulting in a list of IPs. We remove trusted IP values, and then take the last given value, assuming that it is the most likely to be the correct, unfaked value. See [1] for a very thorough discussion of why that is the best option we have at the moment. [1]: http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/ Fixes #7979
* Merge pull request #8666 from mekishizufu/fix_lambdasSantiago Pastorino2012-12-312-2/+2
|\ | | | | Fix usage of lambda as a Rack endpoint
| * Fix usage of lambda as a Rack endpointJiri Pospisil2012-12-312-2/+2
| | | | | | | | The response body needs to respond_to? :each.
* | Add active_support/testing/autorunRafael Mendonça França2012-12-313-3/+4
| | | | | | | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* | Inherit from MiniTest::Unit::TestCase instead of MiniTest::SpecRafael Mendonça França2012-12-311-1/+1
|/
* Revert "Install binstubs by default"Jeremy Kemper2012-12-281-3/+3
| | | | | | This reverts commit f34c27a452418d8aa17f92bb0fd7ae97b5f7e252. We'll be taking a different tack on this with new `bundle binstubs <gem>` support.
* Revert "Detect rbenv and update the shebang"Jeremy Kemper2012-12-282-10/+0
| | | | | This reverts commit 7173c4f931c9026bd3bc0b644d93dae744433f09. This reverts commit a562f9fa09967eba26dff1c3bc8aa85b6f0a72ff.
* Consistent use of single and double quotesRafael Mendonça França2012-12-261-10/+10
|
* quote column names in generated fixture filesYves Senn2012-12-261-3/+26
|
* Merge pull request #8588 from marcandre/fix_reversibleCarlos Antonio da Silva2012-12-231-2/+2
|\ | | | | Fix Migration#reversible by not using `transaction`.
| * Fixes for PR [#8267]Marc-Andre Lafortune2012-12-221-2/+2
| | | | | | | | | | | | | | | | * Fix Migration#reversible by not using `transaction`. * Adapt mysql adapter to updated api for remove_column * Update test after aedcd683684d08eaf30623a4b48ce31a31426372
* | Forgot to check in railties fixture for binstubsYehuda Katz2012-12-221-0/+0
| |
* | Add --no-html to scaffold generatorYehuda Katz2012-12-222-0/+17
| |
* | Detect rbenv and update the shebangYehuda Katz2012-12-221-0/+10
| |
* | Install binstubs by defaultYehuda Katz2012-12-221-3/+3
|/
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-212-170/+0
| | | | with Rails 4.0.
* Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set ↵Andy Lindeman2012-12-211-0/+12
| | | | | | (e.g., in Pow) * Fixes #8025
* Migration generators use `change` even for destructive methods [#8267]Marc-Andre Lafortune2012-12-211-31/+12
|
* Simple replacement of variable name for consistencyMarc-Andre Lafortune2012-12-211-32/+32
|
* Revert "Add test to deprecation of Path#children"Carlos Antonio da Silva2012-12-191-6/+0
| | | | | | | | | | This reverts commit 29b1dc273e1ad6b9e13bf48fe3f12047850f9554. Conflicts: railties/test/application/paths_test.rb Reason: since 7f96e4317e1354852e9600becb16662de3c17691 was reverted, Path#children is no longer deprecated.
* update concerned testsFrancesco Rodriguez2012-12-181-0/+2
|
* Revert "Merge pull request #7587 from elia/fix-too-eager-loading"Rafael Mendonça França2012-12-181-3/+0
| | | | | | | | | | This reverts commit 3663057518eb9acf9b1e72f47dcb07038e6b7368. REASON: This caused a regression that add app folder in the eager load path. See #8146 for more information. Conflicts: railties/CHANGELOG.md
* HTML formatting to Rails::InfoController#routesschneems2012-12-171-1/+1
| | | | | | | | | | This PR adds formatting and meta-data to the display of the internal routes. Users can now toggle between showing helpers with the `_path` or _`url` suffix. There are multiple ways to achieve this, this method uses partials for formatting and meta-data. The partials can be re-used when rendering `routing_error.erb`, though that will need to be in a separate PR. ![](http://f.cl.ly/items/3A2p3c1T1t2f2X2R2K2S/Screen%20Shot%202012-12-12%20at%202.28.01%20PM.png) ATP Railties
* Revert "Fix failing test in railties"Steve Klabnik2012-12-141-1/+2
| | | | | | This reverts commit 6bdc04624dcc0f45aab93af42d00224f67da36d5. This has been reverted because https://github.com/rails/rails/commit/8554537e48d6ed18ef08cb3ac0a9da96ac3c5cd6
* Clear url helper methods when routes are reloadedAndrew White2012-12-141-0/+71
| | | | | Remove all the old url helper methods when clear! is called on the route set because it's possible that some routes have been removed.
* Fix failing test in railtiesCarlos Antonio da Silva2012-12-141-2/+1
| | | | | Related to the HTML route inspector changes: ae68fc3864e99ab43c18fd12577744e1583f6b64
* Fixed test names for generated_attribute_test.rbArun Agrawal2012-12-131-1/+1
|
* Merge pull request #8468 from schneems/schneems/rack-index-pageSantiago Pastorino2012-12-102-8/+36
|\ | | | | Use Rails to Render Default Index Page
| * Use Rails to Render Default Index Pageschneems2012-12-102-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an alternative implementation to #7771 thanks to the advice of @spastorino Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion. This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated. The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik ATP Railties and Actionpack.
* | Make sure that no extra spaces are created with a non-polymorphicRafael Mendonça França2012-12-101-2/+2
| | | | | | | | attributes
* | Ensure the scaffold tests will pass when using references attributesRafael Mendonça França2012-12-101-0/+10
| |
* | Add GeneratedAttribute#column_name to get the name of the column in theRafael Mendonça França2012-12-101-2/+9
| | | | | | | | database
* | Deal with polymorphic attributes correctly in the generatorsRafael Mendonça França2012-12-102-3/+17
| |
* | Make references and belongs_to attributes to generate the _id column inRafael Mendonça França2012-12-101-0/+5
| | | | | | | | fixtures
* | Put the reference and belongs_to attributes in the scaffold tests.Rafael Mendonça França2012-12-102-6/+6
| |
* | Use the references and belongs_id ids in the scaffold_controllerRafael Mendonça França2012-12-091-0/+9
| | | | | | | | generator
* | Add test case for scaffold_controller generator without attributes.Rafael Mendonça França2012-12-091-0/+9
|/ | | | This is a test for 978c568a7bffe354180aaefa471092182fed1015
* Fix scaffold controller generator testsCarlos Antonio da Silva2012-12-081-8/+6
|
* fix scaffold controller generator testsFrancesco Rodriguez2012-12-071-16/+12
|
* Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-071-23/+0
| | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* Stop shelling out more than necessaryCarlos Antonio da Silva2012-12-071-10/+10
|
* Run rake tasks all at once in rake dbs test for a speed upCarlos Antonio da Silva2012-12-061-12/+6
| | | | | | | | | | | Before: Finished tests in 56.245787s, 0.2133 tests/s, 0.0000 assertions/s. 12 tests, 0 assertions, 0 failures, 0 errors, 0 skips After: Finished tests in 42.401416s, 0.2830 tests/s, 0.0000 assertions/s. 12 tests, 0 assertions, 0 failures, 0 errors, 0 skips
* Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-061-0/+23
| | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* Refactor tests that switch RAILS_ENV and RACK_ENVCarlos Antonio da Silva2012-12-066-63/+63
| | | | | | | | | | | | This cleanup aims to fix a build failure: https://travis-ci.org/rails/rails/jobs/3515951/#L482 Since travis always have both ENV vars set to "test", a test is failing where it's expected to output the default env "development", but "test" is the result due to RACK_ENV being set when we expect it to not be. By cleaning this duplication we ensure that changing any of these env variables will pick the right expected value.
* Fix duplicated method nameCarlos Antonio da Silva2012-12-051-2/+1
| | | | [ci skip]
* Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-063-2/+60
|
* Fix failing tests related to rake notesCarlos Antonio da Silva2012-12-031-2/+2
| | | | Related to changes introduced in 553b563749517114323b4e8742509227e0daab67