diff options
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/digestor_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/html_test.rb | 6 | ||||
-rw-r--r-- | actionview/test/template/lookup_context_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/resolver_patterns_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/testing/fixture_resolver_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/testing/null_resolver_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/text_test.rb | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/actionview/test/template/digestor_test.rb b/actionview/test/template/digestor_test.rb index 91861edf11..7affd3c005 100644 --- a/actionview/test/template/digestor_test.rb +++ b/actionview/test/template/digestor_test.rb @@ -361,7 +361,7 @@ class TemplateDigestorTest < ActionView::TestCase def tree_template_formats(template_name) tree = ActionView::Digestor.tree(template_name, finder) - tree.flatten.map(&:template).compact.flat_map(&:formats) + tree.flatten.map(&:template).compact.map(&:format) end def disable_resolver_caching diff --git a/actionview/test/template/html_test.rb b/actionview/test/template/html_test.rb index 5cdff74d60..c5fc8f906c 100644 --- a/actionview/test/template/html_test.rb +++ b/actionview/test/template/html_test.rb @@ -4,16 +4,16 @@ require "abstract_unit" class HTMLTest < ActiveSupport::TestCase test "formats returns symbol for recognized MIME type" do - assert_equal [:html], ActionView::Template::HTML.new("", :html).formats + assert_equal :html, ActionView::Template::HTML.new("", :html).format end test "formats returns string for recognized MIME type when MIME does not have symbol" do foo = Mime::Type.lookup("foo") assert_nil foo.to_sym - assert_equal ["foo"], ActionView::Template::HTML.new("", foo).formats + assert_equal "foo", ActionView::Template::HTML.new("", foo).format end test "formats returns string for unknown MIME type" do - assert_equal ["foo"], ActionView::Template::HTML.new("", "foo").formats + assert_equal "foo", ActionView::Template::HTML.new("", "foo").format end end diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index 5298afb694..a763e24226 100644 --- a/actionview/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb @@ -125,7 +125,7 @@ class LookupContextTest < ActiveSupport::TestCase assert_called(ActionView::Template::Handlers::Builder, :default_format, returns: nil) do @lookup_context.formats = [:text] template = @lookup_context.find("hello", %w(test)) - assert_equal [:text], template.formats + assert_equal :text, template.format end end diff --git a/actionview/test/template/resolver_patterns_test.rb b/actionview/test/template/resolver_patterns_test.rb index 1e1a4c5063..38357aa10b 100644 --- a/actionview/test/template/resolver_patterns_test.rb +++ b/actionview/test/template/resolver_patterns_test.rb @@ -19,7 +19,7 @@ class ResolverPatternsTest < ActiveSupport::TestCase assert_equal 1, templates.size, "expected one template" assert_equal "Hello custom patterns!", templates.first.source assert_equal "custom_pattern/path", templates.first.virtual_path - assert_equal [:html], templates.first.formats + assert_equal :html, templates.first.format end def test_should_return_all_templates_when_ambiguous_pattern diff --git a/actionview/test/template/testing/fixture_resolver_test.rb b/actionview/test/template/testing/fixture_resolver_test.rb index 9954e3500d..4361824a71 100644 --- a/actionview/test/template/testing/fixture_resolver_test.rb +++ b/actionview/test/template/testing/fixture_resolver_test.rb @@ -15,6 +15,6 @@ class FixtureResolverTest < ActiveSupport::TestCase assert_equal 1, templates.size, "expected one template" assert_equal "this text", templates.first.source assert_equal "arbitrary/path", templates.first.virtual_path - assert_equal [:html], templates.first.formats + assert_equal :html, templates.first.format end end diff --git a/actionview/test/template/testing/null_resolver_test.rb b/actionview/test/template/testing/null_resolver_test.rb index 53364c1d90..dad8d0966d 100644 --- a/actionview/test/template/testing/null_resolver_test.rb +++ b/actionview/test/template/testing/null_resolver_test.rb @@ -9,6 +9,6 @@ class NullResolverTest < ActiveSupport::TestCase assert_equal 1, templates.size, "expected one template" assert_equal "Template generated by Null Resolver", templates.first.source assert_equal "arbitrary/path.erb", templates.first.virtual_path.to_s - assert_equal [:html], templates.first.formats + assert_equal :html, templates.first.format end end diff --git a/actionview/test/template/text_test.rb b/actionview/test/template/text_test.rb index 0c6470df21..e7e3b6aae8 100644 --- a/actionview/test/template/text_test.rb +++ b/actionview/test/template/text_test.rb @@ -4,7 +4,7 @@ require "abstract_unit" class TextTest < ActiveSupport::TestCase test "formats always return :text" do - assert_equal [:text], ActionView::Template::Text.new("").formats + assert_equal :text, ActionView::Template::Text.new("").format end test "identifier should return 'text template'" do |