aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 20:20:22 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 20:20:22 +0200
commitb326e82dc012d81e9698cb1f402502af1788c1e9 (patch)
tree6b6452129a5b6b684f3d44f21afd2b1bea83fa22 /actionview/test
parent80e66cc4d90bf8c15d1a5f6e3152e90147f00772 (diff)
downloadrails-b326e82dc012d81e9698cb1f402502af1788c1e9.tar.gz
rails-b326e82dc012d81e9698cb1f402502af1788c1e9.tar.bz2
rails-b326e82dc012d81e9698cb1f402502af1788c1e9.zip
applies remaining conventions across the project
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/actionpack/abstract/abstract_controller_test.rb4
-rw-r--r--actionview/test/actionpack/abstract/helper_test.rb1
-rw-r--r--actionview/test/actionpack/abstract/layouts_test.rb1
-rw-r--r--actionview/test/actionpack/abstract/render_test.rb2
-rw-r--r--actionview/test/actionpack/controller/render_test.rb12
-rw-r--r--actionview/test/activerecord/relation_cache_test.rb1
-rw-r--r--actionview/test/lib/controller/fake_models.rb1
-rw-r--r--actionview/test/template/active_model_helper_test.rb1
-rw-r--r--actionview/test/template/form_options_helper_test.rb12
-rw-r--r--actionview/test/template/lookup_context_test.rb1
-rw-r--r--actionview/test/template/record_tag_helper_test.rb1
-rw-r--r--actionview/test/template/tag_helper_test.rb1
-rw-r--r--actionview/test/template/test_case_test.rb3
-rw-r--r--actionview/test/template/text_helper_test.rb2
-rw-r--r--actionview/test/template/url_helper_test.rb1
15 files changed, 13 insertions, 31 deletions
diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb
index 9989b5a377..c92467c15f 100644
--- a/actionview/test/actionpack/abstract/abstract_controller_test.rb
+++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb
@@ -3,7 +3,6 @@ require "set"
module AbstractController
module Testing
-
# Test basic dispatching.
# ====
# * Call process
@@ -248,7 +247,6 @@ module AbstractController
end
class TestRespondToAction < ActiveSupport::TestCase
-
def assert_dispatch(klass, body = "success", action = :index)
controller = klass.new
controller.process(action)
@@ -284,11 +282,9 @@ module AbstractController
end
class TestActionMethodsReloading < ActiveSupport::TestCase
-
test "action_methods should be reloaded after defining a new method" do
assert_equal Set.new(["index"]), Me6.action_methods
end
end
-
end
end
diff --git a/actionview/test/actionpack/abstract/helper_test.rb b/actionview/test/actionpack/abstract/helper_test.rb
index a6c79f0308..5a2f0839e5 100644
--- a/actionview/test/actionpack/abstract/helper_test.rb
+++ b/actionview/test/actionpack/abstract/helper_test.rb
@@ -4,7 +4,6 @@ ActionController::Base.helpers_path = File.expand_path("../../../fixtures/helper
module AbstractController
module Testing
-
class ControllerWithHelpers < AbstractController::Base
include AbstractController::Helpers
include AbstractController::Rendering
diff --git a/actionview/test/actionpack/abstract/layouts_test.rb b/actionview/test/actionpack/abstract/layouts_test.rb
index e4abac1315..4ece992597 100644
--- a/actionview/test/actionpack/abstract/layouts_test.rb
+++ b/actionview/test/actionpack/abstract/layouts_test.rb
@@ -2,7 +2,6 @@ require "abstract_unit"
module AbstractControllerTests
module Layouts
-
# Base controller for these tests
class Base < AbstractController::Base
include AbstractController::Rendering
diff --git a/actionview/test/actionpack/abstract/render_test.rb b/actionview/test/actionpack/abstract/render_test.rb
index c658f5ae58..8b0c54fb77 100644
--- a/actionview/test/actionpack/abstract/render_test.rb
+++ b/actionview/test/actionpack/abstract/render_test.rb
@@ -2,7 +2,6 @@ require "abstract_unit"
module AbstractController
module Testing
-
class ControllerRenderer < AbstractController::Base
include AbstractController::Rendering
include ActionView::Rendering
@@ -54,7 +53,6 @@ module AbstractController
end
class TestRenderer < ActiveSupport::TestCase
-
def setup
@controller = ControllerRenderer.new
end
diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb
index 9c13bd7f8e..453c2e75d6 100644
--- a/actionview/test/actionpack/controller/render_test.rb
+++ b/actionview/test/actionpack/controller/render_test.rb
@@ -642,7 +642,7 @@ class TestController < ApplicationController
def determine_layout
case action_name
- when "hello_world", "layout_test", "rendering_without_layout",
+ when "hello_world", "layout_test", "rendering_without_layout",
"rendering_nothing_on_layout", "render_text_hello_world",
"render_text_hello_world_with_layout",
"hello_world_with_layout_false",
@@ -652,11 +652,11 @@ class TestController < ApplicationController
"render_with_explicit_string_template",
"update_page", "update_page_with_instance_variables"
- "layouts/standard"
- when "action_talk_to_layout", "layout_overriding_layout"
- "layouts/talk_from_action"
- when "render_implicit_html_template_from_xhr_request"
- (request.xhr? ? "layouts/xhr" : "layouts/standard")
+ "layouts/standard"
+ when "action_talk_to_layout", "layout_overriding_layout"
+ "layouts/talk_from_action"
+ when "render_implicit_html_template_from_xhr_request"
+ (request.xhr? ? "layouts/xhr" : "layouts/standard")
end
end
end
diff --git a/actionview/test/activerecord/relation_cache_test.rb b/actionview/test/activerecord/relation_cache_test.rb
index 970dfae784..15ddcdd5f6 100644
--- a/actionview/test/activerecord/relation_cache_test.rb
+++ b/actionview/test/activerecord/relation_cache_test.rb
@@ -14,5 +14,4 @@ class RelationCacheTest < ActionView::TestCase
end
def view_cache_dependencies; end
-
end
diff --git a/actionview/test/lib/controller/fake_models.rb b/actionview/test/lib/controller/fake_models.rb
index e1b362c6ed..cc5f5c1d59 100644
--- a/actionview/test/lib/controller/fake_models.rb
+++ b/actionview/test/lib/controller/fake_models.rb
@@ -108,7 +108,6 @@ class Tag
attr_accessor :relevances
def relevances_attributes=(attributes); end
-
end
class CommentRelevance
diff --git a/actionview/test/template/active_model_helper_test.rb b/actionview/test/template/active_model_helper_test.rb
index 1fba4298e8..8b8f686f96 100644
--- a/actionview/test/template/active_model_helper_test.rb
+++ b/actionview/test/template/active_model_helper_test.rb
@@ -95,5 +95,4 @@ class ActiveModelHelperTest < ActionView::TestCase
ensure
ActionView::Base.field_error_proc = old_proc if old_proc
end
-
end
diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb
index f588fb2fd2..84c322e522 100644
--- a/actionview/test/template/form_options_helper_test.rb
+++ b/actionview/test/template/form_options_helper_test.rb
@@ -495,9 +495,9 @@ class FormOptionsHelperTest < ActionView::TestCase
assert_dom_equal(
[
- %Q{<select id="post_origin" name="post[origin]"><optgroup label="&lt;Africa&gt;"><option value="&lt;sa&gt;">&lt;South Africa&gt;</option>},
- %Q{<option value="so">Somalia</option></optgroup><optgroup label="Europe"><option value="dk">Denmark</option>},
- %Q{<option value="ie">Ireland</option></optgroup></select>},
+ '<select id="post_origin" name="post[origin]"><optgroup label="&lt;Africa&gt;"><option value="&lt;sa&gt;">&lt;South Africa&gt;</option>',
+ '<option value="so">Somalia</option></optgroup><optgroup label="Europe"><option value="dk">Denmark</option>',
+ '<option value="ie">Ireland</option></optgroup></select>',
].join("\n"),
select("post", "origin", countries_by_continent)
)
@@ -513,9 +513,9 @@ class FormOptionsHelperTest < ActionView::TestCase
assert_dom_equal(
[
- %Q{<select id="post_origin" name="post[origin]"><optgroup label="&lt;Africa&gt;"><option value="&lt;sa&gt;">&lt;South Africa&gt;</option>},
- %Q{<option value="so">Somalia</option></optgroup><optgroup label="Europe"><option value="dk">Denmark</option>},
- %Q{<option value="ie">Ireland</option></optgroup></select>},
+ '<select id="post_origin" name="post[origin]"><optgroup label="&lt;Africa&gt;"><option value="&lt;sa&gt;">&lt;South Africa&gt;</option>',
+ '<option value="so">Somalia</option></optgroup><optgroup label="Europe"><option value="dk">Denmark</option>',
+ '<option value="ie">Ireland</option></optgroup></select>',
].join("\n"),
select("post", "origin", countries_by_continent)
)
diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb
index 2a8ae9d4a3..77fab5652f 100644
--- a/actionview/test/template/lookup_context_test.rb
+++ b/actionview/test/template/lookup_context_test.rb
@@ -284,5 +284,4 @@ class TestMissingTemplate < ActiveSupport::TestCase
end
assert_match %r{Missing partial parent/_foo with .* Searched in:\n \* "/Path/to/views"\n}, e.message
end
-
end
diff --git a/actionview/test/template/record_tag_helper_test.rb b/actionview/test/template/record_tag_helper_test.rb
index 2840ad01b2..3685230558 100644
--- a/actionview/test/template/record_tag_helper_test.rb
+++ b/actionview/test/template/record_tag_helper_test.rb
@@ -14,7 +14,6 @@ class RecordTagPost
end
class RecordTagHelperTest < ActionView::TestCase
-
tests ActionView::Helpers::RecordTagHelper
def setup
diff --git a/actionview/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb
index 3e060d0246..281fec7291 100644
--- a/actionview/test/template/tag_helper_test.rb
+++ b/actionview/test/template/tag_helper_test.rb
@@ -334,5 +334,4 @@ class TagHelperTest < ActionView::TestCase
def test_respond_to
assert_respond_to tag, :any_tag
end
-
end
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb
index cd7221ca0e..40a5bfca53 100644
--- a/actionview/test/template/test_case_test.rb
+++ b/actionview/test/template/test_case_test.rb
@@ -2,7 +2,6 @@ require "abstract_unit"
require "rails/engine"
module ActionView
-
module ATestHelper
end
@@ -193,7 +192,6 @@ module ActionView
test "protect_from_forgery? in any helpers returns false" do
assert !view.help_me
end
-
end
class ATestHelperTest < ActionView::TestCase
@@ -282,7 +280,6 @@ module ActionView
@customers = [DeveloperStruct.new("Eloy"), DeveloperStruct.new("Manfred")]
assert_match(/Hello: EloyHello: Manfred/, render(file: "test/list"))
end
-
end
class AssertionsTest < ActionView::TestCase
diff --git a/actionview/test/template/text_helper_test.rb b/actionview/test/template/text_helper_test.rb
index 0317c433d1..9f57e6a6ae 100644
--- a/actionview/test/template/text_helper_test.rb
+++ b/actionview/test/template/text_helper_test.rb
@@ -38,7 +38,7 @@ class TextHelperTest < ActionView::TestCase
text = "A\r\n \nB\n\n\r\n\t\nC\nD".freeze
assert_equal "<p>A\n<br /> \n<br />B</p>\n\n<p>\t\n<br />C\n<br />D</p>", simple_format(text)
- assert_equal %q(<p class="test">This is a classy test</p>), simple_format("This is a classy test", class: "test")
+ assert_equal '<p class="test">This is a classy test</p>', simple_format("This is a classy test", class: "test")
assert_equal %Q(<p class="test">para 1</p>\n\n<p class="test">para 2</p>), simple_format("para 1\n\npara 2", class: "test")
end
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index 4fd3e0369c..bbbeb39f3f 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -1,7 +1,6 @@
require "abstract_unit"
class UrlHelperTest < ActiveSupport::TestCase
-
# In a few cases, the helper proxies to 'controller'
# or request.
#