From 487aa51b1414d3f316c7ccdc92af2f212961e0bb Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Tue, 31 Mar 2015 14:36:26 +0300 Subject: Suggest new hash syntax in testing guide --- guides/source/testing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/testing.md b/guides/source/testing.md index df61c61aa3..a67f2edbaa 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -496,13 +496,13 @@ All the keyword arguments are optional. Example: Calling the `:show` action, passing an `id` of 12 as the `params` and setting a `user_id` of 5 in the session: ```ruby -get(:show, params: { 'id' => "12" }, session: { 'user_id' => 5 }) +get(:show, params: { id: 12 }, session: { user_id: 5 }) ``` Another example: Calling the `:view` action, passing an `id` of 12 as the `params`, this time with no session, but with a flash message. ```ruby -get(:view, params: { 'id' => '12' }, flash: { 'message' => 'booya!' }) +get(:view, params: { id: 12 }, flash: { message: 'booya!' }) ``` NOTE: If you try running `test_should_create_article` test from `articles_controller_test.rb` it will fail on account of the newly added model level validation and rightly so. -- cgit v1.2.3