aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
* There are some cases where @@app is not definedSantiago Pastorino2016-07-261-0/+28
|
* A generated app should not include Uglifier with `--skip-javascript` option.Ben Pickles2016-07-261-0/+5
|
* Enforce minimal web-console version for Rails 5Genadi Samokovarov2016-07-211-2/+2
| | | | | | | | | | | | | | | I dropped the version constraint in web-console with the idea it will be easier to upgrade the console between Rails releases. However, issues like #25899 started popping up. I'm reintroducing the constraint, but this time, I don't set an upper limit to the major version. This will keep the web-console in a version that always works for the current Rails version and can be easily upgraded to the last one with `bundle update`. We may need to backport this for Rails 5.0.1. Fixes #25899.
* Merge pull request #25438 from prathamesh-sonpatki/rm-session-store-initializerRafael Mendonça França2016-07-203-11/+16
|\ | | | | | | Setup default session store internally, no longer through an initializer
| * Setup default session store internally, no longer through an application ↵Prathamesh Sonpatki2016-07-173-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | initializer - By default the session store will be set to cookie store with application name as session key. - Older apps are not affected as they will have the session store initializer generated by Rails in older versions, and Rails will not overwrite the session store if it is already set or disabled. - But new apps will not have the initializer, instead the session store will be set to cookie store by default. - Based on comment by DHH here - https://github.com/rails/rails/issues/25181#issuecomment-222312764.
* | Fix typo in mailer previews test description [ci skip]Gale Shafer2016-07-141-1/+1
| | | | | | | | | | A mailer preview test description misspelled the word configuration. This commit updates the test description to spell the word correctly.
* | rails -> Rails [ci skip]Santosh Wadghule2016-07-122-2/+2
| |
* | remove unnecessary sendyuuji.yaginuma2016-07-101-5/+5
|/ | | | | `class_variable_get` is public from Ruby 1.9. Ref: http://ruby-doc.org/core-2.2.0/Module.html#method-i-class_variable_get
* Merge pull request #25652 from prathamesh-sonpatki/rm-boot-railsGuillermo Iguaran2016-07-0838-46/+3
|\ | | | | Remove unused boot_rails method and it's usage
| * Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-0438-46/+3
| | | | | | | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* | Merge pull request #25688 from mahnunchik/host-env-varGuillermo Iguaran2016-07-081-0/+7
|\ \ | | | | | | Use the HOST environment variable for rails server #25677
| * | Use the HOST environment variable for rails server #25677Evgeny Vlasenko2016-07-051-0/+7
| |/
* | Merge pull request #25730 from prathamesh-sonpatki/rm-cookie-onlyRafael França2016-07-071-0/+6
|\ \ | | | | | | No need to set `cookie_only` option from Rails
| * | Add a test case for verifying `cookie_only` is set even if user tries to set ↵Prathamesh Sonpatki2016-07-071-0/+6
| | | | | | | | | | | | it false
* | | Fix typo in test caseAbhishek Jain2016-07-081-1/+1
|/ /
* | Merge pull request #25704 from ↵Rafael França2016-07-051-0/+7
|\ \ | | | | | | | | | | | | fledman/add_respond_to_missing_to_rails_application_configuration_custom implement respond_to_missing? to match method_missing
| * | implement respond_to_missing? to match method_missingDavid Feldman2016-07-051-0/+7
| | |
* | | Merge pull request #25692 from ↵Rafael França2016-07-051-0/+12
|\ \ \ | |/ / |/| | | | | | | | johnmeehan/allow-registering-directory-for-rake-notes Allow rake notes to work with other directories.
| * | Fix test to try `spec/` directory as opposed to `app/spec` which I hadJohn Meehan2016-07-051-2/+2
| | | | | | | | | | | | | | | | | | accidently set it to. Made the change and test still passes.
| * | removed extra blank lineJohn Meehan2016-07-051-1/+0
| | |
| * | Allow rake notes to work with other directories.John Meehan2016-07-051-0/+13
| |/ | | | | | | | | | | | | Additional directories can be added using SourceAnnotationExtractor::Annotation.register_directories("spec", "other_dir") Result: rake notes will now extract notes from these directories.
* | Merge pull request #25257 from ta1kt0me/inspect_initializersRichard Schneeman2016-07-051-0/+5
|\ \ | |/ |/| Display railtie class name in `rails initializers`
| * Initializer provides its context class nameta1kt0me2016-06-121-0/+5
| |
* | Merge pull request #25222 from vipulnsward/25219-fix-logsMatthew Draper2016-07-021-8/+16
|\ \ | | | | | | Clean backtrace in IRB
| * | - Added test for verifying that we treat line number indications from irb as ↵Vipul A M2016-07-011-8/+16
| | | | | | | | | | | | | | | | | | user/lib code - Cleaned up backtrace cleaner test code and removed instaces variables
* | | Do not run `bundle install` when generating a new plugin.Rafael Mendonça França2016-07-013-101/+102
|/ / | | | | | | | | | | Since bundler 1.12.0, the gemspec is validated so the `bundle install` command will fail just after the gem is created causing confusion to the users. This change was a bug fix to correctly validate gemspecs.
* | Use sass-rails in our test suiteRafael Mendonça França2016-06-301-1/+1
| |
* | Fix rails/info routes for apps with globbing routeNicholas Firth-McCoy2016-06-201-0/+19
| | | | | | | | | | | | | | | | The /rails/info routes were inaccessible in apps with a catch-all globbing route, as they were being appended after the globbing route and would never be matched. See also ccc3ddb7762bae0df7e2f8d643b19b6a4769d5be.
* | Fix failing railties testsPrathamesh Sonpatki2016-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | - Railties tests related to fetching asset URL started failing after the release of sprockets 3.6.1 on Travis. - This was due to the change in https://github.com/rails/sprockets/pull/311/files which changed the logic in `concat_javascript_sources` to add `;` at the end of file if the source did not end with semicolon. - Bumped up sprockets minor version and fixed the failing tests.
* | Merge pull request #25390 from gsamokovarov/abstact-unit-presence-requireRafael França2016-06-131-0/+1
|\ \ | | | | | | Require "active_support/core_ext/object/blank" for railties abstract unit
| * | Require "active_support/core_ext/object/blank" for railties abstract unitGenadi Samokovarov2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In #25380 I moved an `active_support/core_ext/object/blank` in the `activesupport/lib/active_support/testing/assertions.rb`, however it caused a chain reaction, resulting in failing railties tests. Moving the require to `railties/test/isolation/abstract_unit.rb` and `activesupport/test/abstract_unit.rb`.
* | | Merge pull request #25319 from morgoth/generate-application-record-firstRafael França2016-06-134-18/+18
|\ \ \ | |/ / |/| | Generate application_record.rb file before model file
| * | Generate application_record.rb file before model fileWojciech Wnętrzak2016-06-084-18/+18
| | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #25004 from ↵Eileen M. Uchitelle2016-06-122-0/+23
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/generate_mailer_layout_files_if_it_does_not_already_exist generate mailer layout files if it does not already exist
| * | | generate mailer layout files if it does not already existyuuji.yaginuma2016-05-152-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if `ApplicationMailer` does not exist, it is generated when run the mailer generator, but layouts files does not generate. However, because it uses the layouts in `ApplicationMailer`, layouts are required. Follow up to #24161
* | | | Prevent `{ internal: true }` from being stored in the routerJon Moss2016-06-071-0/+6
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forgotten followup to #23669 :grimacing: If you went to an internal route (e.g. `/rails/info/routes`), you would previously see the following in your logger: ```bash Processing by Rails::InfoController#routes as HTML Parameters: {"internal"=>true} Rendering /Users/jon/code/rails/rails/railties/lib/rails/templates/rails/info/routes.html.erb within layouts/application Rendered collection of /Users/jon/code/rails/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (10.5ms) Rendered /Users/jon/code/rails/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.5ms) Rendered /Users/jon/code/rails/rails/railties/lib/rails/templates/rails/info/routes.html.erb within layouts/application (23.5ms) Completed 200 OK in 50ms (Views: 35.1ms | ActiveRecord: 0.0ms) ``` Now, with this change, you would see: ```bash Processing by Rails::InfoController#routes as HTML Rendering /Users/jon/code/rails/rails/railties/lib/rails/templates/rails/info/routes.html.erb within layouts/application Rendered collection of /Users/jon/code/rails/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.6ms) Rendered /Users/jon/code/rails/rails/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb (10.2ms) Rendered /Users/jon/code/rails/rails/railties/lib/rails/templates/rails/info/routes.html.erb within layouts/application (17.4ms) Completed 200 OK in 44ms (Views: 28.0ms | ActiveRecord: 0.0ms) ```
* | | Merge pull request #25317 from prathamesh-sonpatki/fix-api-controller-testsKasper Timm Hansen2016-06-071-2/+2
|\ \ \ | | | | | | | | Fix API controller tests by assigning them the encoding type
| * | | Fix API controller tests by assigning them the encoding typePrathamesh Sonpatki2016-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | Merge pull request #25247 from y-yagi/reference_actual_classKasper Timm Hansen2016-06-071-1/+1
|\ \ \ \ | |/ / / |/| | | reference actual class to use middleware
| * | | reference actual class to use middlewareyuuji.yaginuma2016-06-021-1/+1
| | |/ | |/| | | | | | | Using strings for middleware class names is deprecated in 83b767cef90abfc4c2ee9f4b451b0215501fae9a.
* | | Remove FORCE option as it was only needed for testsPrathamesh Sonpatki2016-06-071-1/+3
| | | | | | | | | | | | - Adjusted tests instead.
* | | Fix minor regression about old apps not getting per_form_csrf and ↵Prathamesh Sonpatki2016-06-041-17/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | request_forgery_protection configs - Earlier per_form_csrf_tokens and request_forgery_protection config files were generated for old apps upgraded to Rails 5. - But when we collapsed all initializers into one file, the entire file does not get created for old apps. - This commit fixes it and also changes values for all new defaults for old apps so that they will not break. - Also added a test for `rails app:update`.
* | Collapse all new default initializers into a single filePrathamesh Sonpatki2016-05-312-93/+19
| | | | | | | | | | | | - Adjusted tests also for this new behavior. - Based on the discussion in https://github.com/rails/rails/pull/25184#issuecomment-222454583.
* | Move new default initializers into separate directoryPrathamesh Sonpatki2016-05-283-20/+20
| | | | | | | | | | | | - These initializers are new defaults for Rails 5 and newly generated apps do not need to change them. - Fixes #25181
* | Fix more assertion counts.Kasper Timm Hansen2016-05-281-2/+2
| | | | | | | | Follow up to e45f388.
* | Fix assertion count after 69e1bb52.Kasper Timm Hansen2016-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When changing the generated integration tests to assert redirects with an absolute path this redirection check in `assert_redirected_to` against the absolute response location would now pass: https://github.com/rails/rails/blob/af245aaf3a1c447752a1b5895adddc66e5f73c00/actionpack/lib/action_dispatch/testing/assertions/response.rb#L55 Thus we'd break early instead of hitting `assert_operator` and have 2 fewer assertions per `assert_redirected_to` as `assert_operator` is composed of 2 assertions internally: https://github.com/seattlerb/minitest/blob/4e146b1515b19a5c474e39c174b037510f6dbc6e/lib/minitest/assertions.rb#L254-L258 Deduct 2 assertions for 2 redirects taking the expected count down by 4 in total for the two failing tests.
* | Remove public/ files for API appsPrathamesh Sonpatki2016-05-281-1/+7
| | | | | | | | - Fixes #25180
* | Added a shared section to config/secrets.yml that will be loaded for all ↵David Heinemeier Hansson2016-05-211-0/+25
| | | | | | | | environments
* | Merge pull request #24918 from prathamesh-sonpatki/cable-assetsRafael França2016-05-211-4/+20
|\ \ | | | | | | Cable: Generate .js or .coffee files while generating channel as per the javascript engine of the application
| * | Cable: Generate .js or .coffee files while generating channel as per the ↵Prathamesh Sonpatki2016-05-171-4/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | javascript engine of the application - Now we will detect what javascript engine user is using and based on that we will generate either `.js` or `.coffee` version of the channel file. - This also needs a change in coffee-rails to override the `js_template` method. Related PR https://github.com/rails/coffee-rails/pull/72. - Currently coffee-rails gem sets `config.app_generators.javascript_engine` to `:coffee` and using this information we override the `js_template` to set the extension as `.coffee` in coffee-rails gem. - Using this approach, we can keep the `channel.js` and `channel.coffee` files in the Rails repository itself. - Additionally the `js_template` method can act as public interface for coffee-rails gem to hook into and change the extension to `.coffee` without maintaining the actual asset files. [Prathamesh Sonpatki, Matthew Draper]