aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Add db to the list of default annotation foldersAntonio Cangiano2012-12-011-0/+4
|
* Remove observers and sweepersRafael Mendonça França2012-11-285-108/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Unused variable warning removedRashmi Yadav2012-11-271-1/+0
|
* Refactor generators tests to include test helpers in the parent classCarlos Antonio da Silva2012-11-271-4/+3
|
* Fix rails db command with sqlite3 databaseCarlos Antonio da Silva2012-11-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | When using sqlite3 it was attempting to find the database file based on Rails.root, the problem is that Rails.root is not always present because we try to first manually load "config/database.yml" instead of loading the entire app, to make "rails db" faster. This means that when we're in the root path of the app, calling "rails db" won't allow us to use Rails.root, making the command fail for sqlite3 with the error: ./rails/commands/dbconsole.rb:62:in `start': undefined method `root' for Rails:Module (NoMethodError) The fix is to simply not pass any dir string to File.expand_path, which will make it use the current directory of the process as base, or the root path of the app, which is what we want. When we are in any other subdirectory, calling "rails db" should work just fine, because "config/database.yml" won't be found, thus "rails db" will fallback to loading the app, making Rails.root available. Closes #8257.
* Add UpgradeSignatureToEncryptionCookieStoreSantiago Pastorino2012-11-161-0/+110
| | | | | | This allows easy upgrading from the old signed Cookie Store <= 3.2 or the deprecated one in 4.0 (the ones that doesn't use key derivation) to the new one that signs using key derivation
* Remove duplicated get /foo/write_sessionSantiago Pastorino2012-11-161-1/+0
|
* Remove unused config optionSantiago Pastorino2012-11-161-1/+0
|
* Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-157-10/+66
|\ | | | | Encrypted cookies
| * Rename secret_token_key to secret_key_baseSantiago Pastorino2012-11-034-6/+6
| |
| * Use derived keys everywhere, http_authentication was missing itSantiago Pastorino2012-11-033-19/+4
| |
| * Add encrypted cookie storeSantiago Pastorino2012-11-032-1/+52
| |
| * Sign cookies using key deriverSantiago Pastorino2012-11-033-5/+25
| |
* | asset compilation should not require a database connectionAaron Patterson2012-11-131-0/+26
| |
* | Merge pull request #8169 from nicolasdespres/robust_git_repository_checkRafael Mendonça França2012-11-131-0/+29
|\ \ | | | | | | Rake test:uncommitted finds git directory in ancestors.
| * | Rake test:uncommitted finds git directory in ancestors.Nicolas Despres2012-11-101-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes your git directory is an ancestor of your application root directory. For example: ./repo/.git/ ./repo/app/Rakefile In this case rake test:uncommitted will be unable to detect your SCM. This patch fixes this and add a test.
* | | Removing warning : ambiguous first argumentArun Agrawal2012-11-111-2/+2
|/ /
* | Removing warning : assigned but unused variableArun Agrawal2012-11-101-1/+1
| |
* | `plugin new` adds dummy app tasks when necessary.Yves Senn2012-11-081-0/+6
| | | | | | | | | | | | | | Closes #8121 The `plugin new` generator always adds the dummy app rake tasks, when a dummy app was created.
* | Remove some line breaks between array items that make the assert file tests ↵Carlos Antonio da Silva2012-11-043-41/+18
|/ | | | harder to read
* Small change to remove warning unused variable.Arun Agrawal2012-11-011-1/+1
|
* Fix deprecation message in test for Path#childrenCarlos Antonio da Silva2012-10-291-1/+1
|
* Add test to deprecation of Path#childrenRafael Mendonça França2012-10-291-0/+6
|
* Merge pull request #7587 from elia/fix-too-eager-loadingRafael Mendonça França2012-10-291-0/+3
| | | | | | Should not eager_load app/assets Conflicts: railties/CHANGELOG.md
* Job consumer logs to Rails.logger by defaultJeremy Kemper2012-10-261-0/+1
|
* changed test case nameTima Maslyuchenko2012-10-231-1/+1
|
* Remove warning setting eager_loadRafael Mendonça França2012-10-181-0/+1
|
* Don't use action_controller.perform_caching to enable rack-rack.Rafael Mendonça França2012-10-182-6/+13
| | | | | Setting the action_dispatch.rack_cache options to true or a hash should be the way to enable it.