aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-01-05 17:20:57 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-01-05 19:58:52 +0900
commit5473e390d362755125d2f47b64ef0a135f2fe111 (patch)
treeb9c199a3c78ad307ed034cf5618e2897dfa650c6 /actionpack/test/controller
parent6197a38bca988f05087aa022e288922cf0331d6c (diff)
downloadrails-5473e390d362755125d2f47b64ef0a135f2fe111.tar.gz
rails-5473e390d362755125d2f47b64ef0a135f2fe111.tar.bz2
rails-5473e390d362755125d2f47b64ef0a135f2fe111.zip
`self.` is not needed when calling its own instance method
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/integration_test.rb4
-rw-r--r--actionpack/test/controller/url_for_test.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 4fae4071b1..cd1415b56c 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -269,8 +269,8 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest
test "response cookies are added to the cookie jar for the next request" do
with_test_route_set do
- self.cookies["cookie_1"] = "sugar"
- self.cookies["cookie_2"] = "oatmeal"
+ cookies["cookie_1"] = "sugar"
+ cookies["cookie_2"] = "oatmeal"
get "/cookie_monster"
assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"]
assert_equal({ "cookie_1" => "", "cookie_2" => "oatmeal", "cookie_3" => "chocolate" }, cookies.to_hash)
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb
index 382b4e273d..862dcf01c3 100644
--- a/actionpack/test/controller/url_for_test.rb
+++ b/actionpack/test/controller/url_for_test.rb
@@ -26,7 +26,7 @@ module AbstractController
action: :index
}
}.url_helpers
- self.default_url_options[:host] = "example.com"
+ default_url_options[:host] = "example.com"
}
path = klass.new.fun_path(controller: :articles,