aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ✂️ needless lines beneath private.Kasper Timm Hansen2016-11-206-6/+0
|
* Merge pull request #27111 from maclover7/jm-xmlminiKasper Timm Hansen2016-11-209-970/+317
|\ | | | | Refactor ActiveSupport::XMLMini test suite
| * Move tests to a module, include in subclasses, style lintingJon Moss2016-11-201-188/+195
| | | | | | | | | | | | | | | | This fixes an error where the test runner would try and run XMLMiniEngineTest like a normal test class, except it's abstract. Now, to circumvent this, we don't include any of the actual tests in XMLMiniEngineTest; they are wrapped in a module that is included in subclass when they inherit from XMLMiniEngineTest. Pretty neat, huh?
| * Create XMLMiniEngineTest; base class for all testsJon Moss2016-11-207-63/+33
| |
| * Code styling cleanupJon Moss2016-11-207-152/+162
| |
| * Create `CommonXMLMiniAdapterTest`; common tests moduleJon Moss2016-11-207-916/+279
| | | | | | | | | | | | Created a new module (a la Action Cable subscription adapter's test suite) to be included in all sub class test to ensure compatability and reduce duplicated code.
| * Install libxml-ruby gem so full XMLMini test suite can be runJon Moss2016-11-192-0/+3
| |
| * Do not include `ActiveSupport` into test classesJon Moss2016-11-193-33/+27
| | | | | | | | | | | | | | | | | | | | | | Will help get rid of errors like the following: ``` 1) Error: JDOMEngineTest#test_order=: ArgumentError: wrong number of arguments (0 for 1) /Users/jon/code/rails/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb:106:in `test_order=' ```
* | Pass `rails runner` args onto file again.Kasper Timm Hansen2016-11-202-1/+10
| | | | | | | | | | | | | | | | | | When making the new command insfrastructure I had missed that `bin/rails runner some_file.rb some args` would pass the extra args onto the file in `ARGV`. Now fixed by allowing the command to take extra args again, and make sure to remove the file name from `ARGV`.
* | Merge pull request #27118 from ↵Kasper Timm Hansen2016-11-202-22/+25
|\ \ | | | | | | | | | | | | prathamesh-sonpatki/correct-prepared-statements-test Fix prepared statements disabled test again
| * | Fix prepared statements disabled test againPrathamesh Sonpatki2016-11-202-22/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Due to `assert_nothing_raised` this test was not really testing anything. - So updated it to assert that the query gives expected result. - Also in general we can use `connection.unprepared_statement` for testing queries w/o prepared statements but it can't be used in this case. This test cases was added because when prepared_statements config is set to false, then DetermineIfPreparableVisitor module does not extended by Arel visitor resulting into an error. Ref: https://github.com/rails/rails/pull/22748. - Because DetermineIfPreparableVisitor module does not get added to the visitor chain only if prepared_statements is false while **setting up connection**, not when `unprepared_statement` is used. - I have also added an assertion for making sure that prepared_config is set to false from the start, so that nobody accidentally removes the connection setup using `arunit_without_prepared_statements` and replaces it with stubs or unprepared_statement.
* | Merge pull request #27117 from kirs/activemodel-testing-implementationGuillermo Iguaran2016-11-191-3/+3
|\ \ | | | | | | Do not rely on Ruby implementation in AM test
| * | Do not rely on Ruby implementation in AM testKir Shatrov2016-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now a few tests in ActiveModel rely on Ruby implementation and the fact that in MRI `97.18` as a float is greater than `97.18` as a BigDecimal. This is only relevant for MRI. On JRuby, comparing float to BigDecimal would be conversion of them to the same type and they will be equal. I'd like the ActiveModel test suite to be Ruby implementation-agnostic. Here we test ActiveModel, not the Ruby internals. This PR fixes a couple more JRuby tests.
* | | Use existing --skip-turbolinks option for conditionals instead of checking ↵Guillermo Iguaran2016-11-192-2/+2
| | | | | | | | | | | | if turbolinks is present in gemfile list
* | | Merge pull request #27116 from maclover7/jm-actionview-docsJon Moss2016-11-191-1/+1
|\ \ \ | | | | | | | | Change html-scanner to rails-html-sanitizer
| * | | Change html-scanner to rails-html-sanitizerJon Moss2016-11-191-1/+1
| | |/ | |/| | | | | | | [ci skip]
* | | Merge pull request #27115 from rails/revert-27114-fix_typoJon Moss2016-11-191-1/+1
|\ \ \ | | | | | | | | Revert "fix typo in `match` doc [ci skip]"
| * | | Revert "fix typo in `match` doc [ci skip]"Jon Moss2016-11-191-1/+1
|/ / /
* | | Merge pull request #27114 from y-yagi/fix_typoGuillermo Iguaran2016-11-191-1/+1
|\ \ \ | | | | | | | | fix typo in `match` doc [ci skip]
| * | | fix typo in `match` doc [ci skip]yuuji.yaginuma2016-11-201-1/+1
| | | | | | | | | | | | | | | | s/Constrains/Constraints
* | | | Merge pull request #27112 from kamipo/follow-up-27109Kasper Timm Hansen2016-11-192-2/+2
|\ \ \ \ | |/ / / |/| | | Fix typo s/with/without/
| * | | Fix typo s/with/without/Ryuta Kamizono2016-11-202-2/+2
|/ / / | | | | | | | | | Follow up to #27109.
* | | Merge pull request #27106 from prathamesh-sonpatki/add-missing-testEileen M. Uchitelle2016-11-191-0/+20
|\ \ \ | | | | | | | | Add missing test for singular resource output in rake routes
| * | | Add missing test for singular resource output in rake routesPrathamesh Sonpatki2016-11-191-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This test was present in https://github.com/rails/rails/pull/27089 but not present on master, may be removed in merge commit? - There was discussion about moving this to `application/rake_test` so may be this happened in merge commit. - https://github.com/rails/rails/pull/27089#discussion_r88731157
* | | | Merge pull request #27109 from prathamesh-sonpatki/fix-prepared-statements-testKasper Timm Hansen2016-11-193-5/+9
|\ \ \ \ | |_|/ / |/| | | Fix tests for prepared_statements: false and queries hitting `#select_all`
| * | | Fix tests for prepared_statements: false and queries hitting `#select_all`Prathamesh Sonpatki2016-11-193-5/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | - The query needs to be executed for hitting `select_all` so made sure that query gets executed. - Also instead of changing instance variable, just add new configuration for prepared_statements: false and use it for this test. - This way we don't have to touch the internals of AR code and still disable prepared statements config for this test.
* | | Merge pull request #27103 from y-yagi/move_changelog_entry_to_appropriate_fileEileen M. Uchitelle2016-11-192-6/+6
|\ \ \ | | | | | | | | move CHANGELOG entry to the appropriate file [ci skip]
| * | | move CHANGELOG entry to the appropriate file [ci skip]yuuji.yaginuma2016-11-192-6/+6
| |/ / | | | | | | | | | Follow up to #27098
* | | Merge pull request #27057 from kamipo/fix_race_conditionMatthew Draper2016-11-191-6/+7
|\ \ \ | |/ / |/| | | | | Fix the race condition caused by `with_new_connections_blocked`
| * | Fix the race condition caused by `with_new_connections_blocked`Ryuta Kamizono2016-11-181-8/+4
| |/ | | | | | | | | | | `with_new_connections_blocked` was introduced at #14938. But the method sometimes causes `@new_cons_enabled = false` then never toggled to true.
* | Merge pull request #27089 from erickueen/erickueen_fix_26606Rafael Mendonça França2016-11-183-13/+19
|\ \ | | | | | | | | | Fix incorrect output from rails routes when using singular resources …
| * | Fix incorrect output from rails routes when using singular resources issue ↵Erick Reyna2016-11-184-12/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #26606 Rails routes (even rake routes in previous versions) output showed incorrect routes when an application use resource :controller, implying that edit_controller_path match with controller#show. The order of the output has changed to correct this. View #26606 for more information. Added a test case, change unit test in rake to expect the new output. Since the output of resource :controller is changing, the string spected of the railties/test/application/rake_test.rb test_rails_routes_with_controller_environment had to be modified.
* | | Merge pull request #27092 from prathamesh-sonpatki/https-source-bundlerRafael França2016-11-181-0/+5
|\ \ \ | | | | | | | | Use secure source for gems referencing "github" in the generated apps
| * | | Use secure source for gems referencing "github" in the generated appsPrathamesh Sonpatki2016-11-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - New apps generated on master and latest bundler give warning about "github" source being insecure. - Use the same solution used for Rails master in the generated app's Gemfile to fix this issue.
* | | | Merge pull request #27098 from sina-s/fix-unexpected-session-sharingRafael Mendonça França2016-11-183-0/+15
|\ \ \ \ | | | | | | | | | | | | | | | Fix unexpected session sharing
| * | | | Fix `ActionDispatch::IntegrationTest#open_session`Tawan Sierek2016-11-183-0/+15
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset a new session directly after its creation in `ActionDispatch::IntegrationTest#open_session`. Reset the session to a clean state before making it available to the client's test code. Issue #22742 reports unexpected behavior of integration tests that run multiple sessions. For example an `ActionDispatch::Flash` instance is shared across multiple sessions, though a client code will rightfully assume that each new session has its own flash hash. The following test failed due to this behavior: class Issue22742Test < ActionDispatch::IntegrationTest test 'issue #22742' do integration_session # initialize first session a = open_session b = open_session refute_same(a.integration_session, b.integration_session) end end Instead of creating a new `ActionDispatch::Integration::Session` instance, the same instance is shared across all newly opened test sessions. This is due to the way how new test sessions are created in `ActionDispatch::IntegrationTest#open_session`. The already existing `ActionDispatch::IntegrationTest` instance is duplicated with `Object#dup`, This approach was introduced in commit 15c31c7639b. `Object#dup` copies the instance variables, but not the objects they reference. Therefore this issue only occurred when the current test instance had been tapped in such a way that the instance variable `@integration_session` was initialized before creating the new test session. Close #22742 [Tawan Sierek + Sina Sadeghian]
* | | | Merge pull request #27094 from y-yagi/remove_warnings_from_activejob_test_helperKasper Timm Hansen2016-11-181-4/+4
|\ \ \ \ | |/ / / |/| | | remove Ruby warning from Active Job test helper methods
| * | | remove Ruby warning from Active Job test helper methodsyuuji.yaginuma2016-11-181-4/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warnings. ``` /home/travis/build/rails/rails/activejob/lib/active_job/test_helper.rb:241: warning: shadowing outer local variable - job /home/travis/build/rails/rails/activejob/lib/active_job/test_helper.rb:265: warning: shadowing outer local variable - job ```
* | | Merge pull request #26551 from mgpnd/FixContentLengthRafael França2016-11-172-2/+13
|\ \ \ | | | | | | | | Fixed CONTENT_LENGTH header in ActionController::TestRequest
| * | | Fixed CONTENT_LENGTH header in ActionController::TestRequestArtem Rashev2016-11-152-2/+13
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONENT_LENGTH setted by string length, which is equal to number of characters in string but StringIO.length is byte sequence and when payload contains non-ASCII characters, stream's length will be different. That's why real byte length should be used for CONTENT_LENGTH header. Add unit test for CONTENT_LENGTH header fix It just passes non-ascii symbols as parameters and verifies that "CONTENT_LENGTH" header has content bytes count as value.
* | | Merge pull request #26981 from kamipo/should_not_except_order_for_existsRafael França2016-11-172-2/+3
|\ \ \ | | | | | | | | Should except `:distinct` rather than `:order` for `exists?`
| * | | Should except `:distinct` rather than `:order` for `exists?`Ryuta Kamizono2016-11-092-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Records fetching order is very important for performance if `limit` is presented. Should not except the order in the case. And `exists?` replaces select list to `1 AS one` therefore `:distinct` is useless (`DISTINCT 1 AS one`). And PostgreSQL raises the following error if `:distinct` and `:order` are used in the same time. ``` ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list ```
* | | | Merge pull request #27090 from tomprats/update-preprocessor-documentationRafael França2016-11-171-21/+11
|\ \ \ \ | | | | | | | | | | Updated Sprockets Documentation
| * | | | Updated Sprockets DocumentationTom Prats2016-11-171-21/+11
| | |_|/ | |/| |
* | | | Merge pull request #27070 from jonhyman/patch-raw-trueRafael França2016-11-171-1/+1
|\ \ \ \ | |/ / / |/| | | Removes 'raw: true' from MemCacheStore#read_multi
| * | | Removes 'raw: true' from MemCacheStore#read_multi, per ↵Jonathan Hyman2016-11-161-1/+1
| | | | | | | | | | | | | | | | https://github.com/rails/rails/issues/27066.
* | | | Refactor the handling of fallback exception handlersSean Griffin2016-11-171-10/+5
| | | |
* | | | Merge pull request #27076 from y-yagi/fix_postgresql_array_encodingSean Griffin2016-11-172-4/+4
|\ \ \ \ | | | | | | | | | | use `force_encoding` instread of `encode!` to avoid `UndefinedConversionError`
| * | | | use `force_encoding` instread of `encode!` to avoid `UndefinedConversionError`yuuji.yaginuma2016-11-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `PG::TextEncoder::Array#encode` returns the encoded value with `ASCII-8BIT`. But in some cases, trying to convert `ASCII-8BIT` to `UTF-8` cause an error. ```ruby "{\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB}".encode!(Encoding::UTF_8) # => Encoding::UndefinedConversionError: "\xE3" from ASCII-8BIT to UTF-8 ``` Should use `force_encoding` to avoid this error. Follow up to 7ba3a48df5bfdc5e98506bb829f937e03b55a5b3 Ref: https://github.com/rails/rails/pull/23619#issuecomment-189924036
* | | | | Merge pull request #26980 from ↵Sean Griffin2016-11-176-13/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | kamipo/respect_new_records_for_collection_proxy_distinct Respect new records for `CollectionProxy#uniq`