aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/file_system_resolver_test.rb
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-03-18 12:03:39 -0700
committerJohn Hawthorn <john@hawthorn.email>2019-04-11 17:09:00 -0700
commit80e2aaa80afc205d223288b85828729cb181f6f2 (patch)
treeaabe92954c029d4a81ab2b52a1b71a669885870b /actionview/test/template/file_system_resolver_test.rb
parent3e628c48406440811f9201e2db7ba0df53bb38e1 (diff)
downloadrails-80e2aaa80afc205d223288b85828729cb181f6f2.tar.gz
rails-80e2aaa80afc205d223288b85828729cb181f6f2.tar.bz2
rails-80e2aaa80afc205d223288b85828729cb181f6f2.zip
Add tests against resolver
We didn't previously have many tests directly against the OptimizedFileSystemResolver or FileSystemResolver, though usually failures would be exposed through other tests. It's easier to test some specifics of the behaviour with unit tests. This also lets us test FileSystemResolver (non-optimized) which I don't think previously had much testing (other than from classses inheriting it).
Diffstat (limited to 'actionview/test/template/file_system_resolver_test.rb')
-rw-r--r--actionview/test/template/file_system_resolver_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionview/test/template/file_system_resolver_test.rb b/actionview/test/template/file_system_resolver_test.rb
new file mode 100644
index 0000000000..aa03fdcb13
--- /dev/null
+++ b/actionview/test/template/file_system_resolver_test.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+require "abstract_unit"
+require "template/resolver_shared_tests"
+
+class FileSystemResolverTest < ActiveSupport::TestCase
+ include ResolverSharedTests
+
+ def resolver
+ ActionView::FileSystemResolver.new(tmpdir)
+ end
+end