diff options
-rw-r--r-- | activejob/test/cases/argument_serialization_test.rb | 2 | ||||
-rw-r--r-- | activerecord/CHANGELOG.md | 14 | ||||
-rw-r--r-- | guides/source/action_view_overview.md | 2 | ||||
-rw-r--r-- | guides/source/configuring.md | 4 | ||||
-rw-r--r-- | guides/source/testing.md | 15 | ||||
-rw-r--r-- | railties/CHANGELOG.md | 6 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 10 |
7 files changed, 36 insertions, 17 deletions
diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb index 59dc3d7f78..75b06ebde4 100644 --- a/activejob/test/cases/argument_serialization_test.rb +++ b/activejob/test/cases/argument_serialization_test.rb @@ -14,7 +14,7 @@ class ArgumentSerializationTest < ActiveSupport::TestCase [ 1, 'a' ], { 'a' => 1 } ].each do |arg| - test "serializes #{arg.class} verbatim" do + test "serializes #{arg.class} - #{arg} verbatim" do assert_arguments_unchanged arg end end diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 68772499c3..5d04551125 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,11 +1,11 @@ -* Fix the generated `#to_param` method to use `omission:''` so that +* Fix the generated `#to_param` method to use `omission: ''` so that the resulting output is actually up to 20 characters, not effectively 17 to leave room for the default "...". Also call `#parameterize` before `#truncate` and make the `separator: /-/` to maximize the information included in the output. - Fixes #23635 + Fixes #23635. *Rob Biedenharn* @@ -23,7 +23,7 @@ *Kevin McPhillips* * Removed the unused methods `ActiveRecord::Base.connection_id` and - `ActiveRecord::Base.connection_id=` + `ActiveRecord::Base.connection_id=`. *Sean Griffin* @@ -42,15 +42,15 @@ *Johannes Opper* -* Introduce ActiveRecord::TransactionSerializationError for catching +* Introduce `ActiveRecord::TransactionSerializationError` for catching transaction serialization failures or deadlocks. *Erol Fornoles* -* PostgreSQL: Fix db:structure:load silent failure on SQL error +* PostgreSQL: Fix db:structure:load silent failure on SQL error. - The command line flag "-v ON_ERROR_STOP=1" should be used - when invoking psql to make sure errors are not suppressed. + The command line flag `-v ON_ERROR_STOP=1` should be used + when invoking `psql` to make sure errors are not suppressed. Example: diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index f68abbae3c..e11466e79f 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -1439,7 +1439,7 @@ Formats a number with the specified level of `precision`, which defaults to 3. ```ruby number_with_precision(111.2345) # => 111.235 -number_with_precision(111.2345, 2) # => 111.23 +number_with_precision(111.2345, precision: 2) # => 111.23 ``` ### SanitizeHelper diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 4332dd68c9..34878e5c38 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -297,7 +297,9 @@ All these configuration options are delegated to the `I18n` library. * Or you can set different fallbacks for locales individually. For example, if you want to use `:tr` for `:az` and `:de`, `:en` for `:da` as fallbacks, you can do it, like so: ```ruby - config.i18n.fallbacks = { az: :tr, da: [:de, :en] } + config.i18n.fallbacks = { az: :tr, da: [:de, :en] } + #or + config.i18n.fallbacks.map = { az: :tr, da: [:de, :en] } ``` ### Configuring Active Record diff --git a/guides/source/testing.md b/guides/source/testing.md index e8dc6ffe2a..440d87bf73 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -851,12 +851,25 @@ cookies["are_good_for_u"] cookies[:are_good_for_u] ### Instance Variables Available -You also have access to three instance variables in your functional tests: +You also have access to three instance variables in your functional tests, after a request is made: * `@controller` - The controller processing the request * `@request` - The request object * `@response` - The response object + +```ruby +class ArticlesControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get articles_url + + assert_equal "index", @controller.action_name + assert_equal "application/x-www-form-urlencoded", @request.media_type + assert_match "Articles", @response.body + end +end +``` + ### Setting Headers and CGI variables [HTTP headers](http://tools.ietf.org/search/rfc2616#section-5.3) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 8a6b5c5cec..f6552a268b 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Set the server host using the `HOST` environment variable. + + *mahnunchik* + * Add public API to register new folders for `rake notes`: config.annotations.register_directories('spec', 'features') @@ -13,7 +17,7 @@ *Rafael Mendonça França* * Default `config.assets.quiet = true` in the development environment. Suppress - logging of `sprockets-rails` requests by default. + logging of assets requests by default. *Kevin McPhillips* diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index de505b62a1..e1c6f214ab 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -778,7 +778,7 @@ module ApplicationTests require "mail" _ = ActionMailer::Base - assert_equal [::MyMailInterceptor], ::Mail.send(:class_variable_get, "@@delivery_interceptors") + assert_equal [::MyMailInterceptor], ::Mail.class_variable_get(:@@delivery_interceptors) end test "registers multiple interceptors with ActionMailer" do @@ -791,7 +791,7 @@ module ApplicationTests require "mail" _ = ActionMailer::Base - assert_equal [::MyMailInterceptor, ::MyOtherMailInterceptor], ::Mail.send(:class_variable_get, "@@delivery_interceptors") + assert_equal [::MyMailInterceptor, ::MyOtherMailInterceptor], ::Mail.class_variable_get(:@@delivery_interceptors) end test "registers preview interceptors with ActionMailer" do @@ -843,7 +843,7 @@ module ApplicationTests require "mail" _ = ActionMailer::Base - assert_equal [::MyMailObserver], ::Mail.send(:class_variable_get, "@@delivery_notification_observers") + assert_equal [::MyMailObserver], ::Mail.class_variable_get(:@@delivery_notification_observers) end test "registers multiple observers with ActionMailer" do @@ -856,7 +856,7 @@ module ApplicationTests require "mail" _ = ActionMailer::Base - assert_equal [::MyMailObserver, ::MyOtherMailObserver], ::Mail.send(:class_variable_get, "@@delivery_notification_observers") + assert_equal [::MyMailObserver, ::MyOtherMailObserver], ::Mail.class_variable_get(:@@delivery_notification_observers) end test "allows setting the queue name for the ActionMailer::DeliveryJob" do @@ -869,7 +869,7 @@ module ApplicationTests require "mail" _ = ActionMailer::Base - assert_equal 'test_default', ActionMailer::Base.send(:class_variable_get, "@@deliver_later_queue_name") + assert_equal 'test_default', ActionMailer::Base.class_variable_get(:@@deliver_later_queue_name) end test "valid timezone is setup correctly" do |