aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorSakshi Jain <sakshijain1107@gmail.com>2018-09-22 17:15:29 +0530
committerSakshi Jain <sakshijain1107@gmail.com>2018-09-23 21:27:44 +0530
commit0fe2bb816f60f4daf5d0d24468af94be971d0eaf (patch)
treef944173b17105aaf2ba7539e05c734f85d3a43b9 /actionview
parentd3b952184d8bdb6154aff1f8bc3eda58046026f6 (diff)
downloadrails-0fe2bb816f60f4daf5d0d24468af94be971d0eaf.tar.gz
rails-0fe2bb816f60f4daf5d0d24468af94be971d0eaf.tar.bz2
rails-0fe2bb816f60f4daf5d0d24468af94be971d0eaf.zip
Remove private def
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/abstract_unit.rb18
-rw-r--r--actionview/test/template/form_helper/form_with_test.rb14
2 files changed, 18 insertions, 14 deletions
diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb
index f20a66c2d2..db46420022 100644
--- a/actionview/test/abstract_unit.rb
+++ b/actionview/test/abstract_unit.rb
@@ -225,12 +225,14 @@ class ActiveSupport::TestCase
include ActionDispatch::DrawOnce
include ActiveSupport::Testing::MethodCallAssertions
- # Skips the current run on Rubinius using Minitest::Assertions#skip
- private def rubinius_skip(message = "")
- skip message if RUBY_ENGINE == "rbx"
- end
- # Skips the current run on JRuby using Minitest::Assertions#skip
- private def jruby_skip(message = "")
- skip message if defined?(JRUBY_VERSION)
- end
+ private
+ # Skips the current run on Rubinius using Minitest::Assertions#skip
+ def rubinius_skip(message = "")
+ skip message if RUBY_ENGINE == "rbx"
+ end
+
+ # Skips the current run on JRuby using Minitest::Assertions#skip
+ def jruby_skip(message = "")
+ skip message if defined?(JRUBY_VERSION)
+ end
end
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb
index c30176349c..85bd72e524 100644
--- a/actionview/test/template/form_helper/form_with_test.rb
+++ b/actionview/test/template/form_helper/form_with_test.rb
@@ -450,13 +450,15 @@ class FormWithActsLikeFormForTest < FormWithTest
def test_form_with_doesnt_call_private_or_protected_properties_on_form_object_skipping_value
obj = Class.new do
- private def private_property
- "That would be great."
- end
+ private
+ def private_property
+ "That would be great."
+ end
- protected def protected_property
- "I believe you have my stapler."
- end
+ protected
+ def protected_property
+ "I believe you have my stapler."
+ end
end.new
form_with(model: obj, scope: "other_name", url: "/", id: "edit-other-name") do |f|