Skip to content

Commit 1c42eb4

Browse files
committed
Fix warnings of ambiguous /
1 parent b2f1d39 commit 1c42eb4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

test/importmap_test.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,35 +97,35 @@ def setup
9797

9898
test "preloaded modules are included in preload tags when no entry_point specified" do
9999
preloading_module_paths = @importmap.preloaded_module_paths(resolver: ApplicationController.helpers).to_s
100-
assert_match /md5/, preloading_module_paths
101-
assert_match /goodbye_controller/, preloading_module_paths
102-
assert_match /leaflet/, preloading_module_paths
103-
assert_no_match /application/, preloading_module_paths
104-
assert_no_match /tinymce/, preloading_module_paths
100+
assert_match(/md5/, preloading_module_paths)
101+
assert_match(/goodbye_controller/, preloading_module_paths)
102+
assert_match(/leaflet/, preloading_module_paths)
103+
assert_no_match(/application/, preloading_module_paths)
104+
assert_no_match(/tinymce/, preloading_module_paths)
105105
end
106106

107107
test "preloaded modules are included in preload tags based on single entry_point provided" do
108108
preloading_module_paths = @importmap.preloaded_module_paths(resolver: ApplicationController.helpers, entry_point: "alternate").to_s
109-
assert_no_match /leaflet/, preloading_module_paths
110-
assert_match /tinymce/, preloading_module_paths
111-
assert_match /chartkick/, preloading_module_paths
112-
assert_match /md5/, preloading_module_paths
113-
assert_match /goodbye_controller/, preloading_module_paths
114-
assert_no_match /application/, preloading_module_paths
109+
assert_no_match(/leaflet/, preloading_module_paths)
110+
assert_match(/tinymce/, preloading_module_paths)
111+
assert_match(/chartkick/, preloading_module_paths)
112+
assert_match(/md5/, preloading_module_paths)
113+
assert_match(/goodbye_controller/, preloading_module_paths)
114+
assert_no_match(/application/, preloading_module_paths)
115115
end
116116

117117
test "preloaded modules are included in preload tags based on multiple entry_points provided" do
118118
preloading_module_paths = @importmap.preloaded_module_paths(resolver: ApplicationController.helpers, entry_point: ["application", "alternate"]).to_s
119-
assert_match /leaflet/, preloading_module_paths
120-
assert_match /tinymce/, preloading_module_paths
121-
assert_match /chartkick/, preloading_module_paths
122-
assert_match /md5/, preloading_module_paths
123-
assert_match /goodbye_controller/, preloading_module_paths
124-
assert_no_match /application/, preloading_module_paths
119+
assert_match(/leaflet/, preloading_module_paths)
120+
assert_match(/tinymce/, preloading_module_paths)
121+
assert_match(/chartkick/, preloading_module_paths)
122+
assert_match(/md5/, preloading_module_paths)
123+
assert_match(/goodbye_controller/, preloading_module_paths)
124+
assert_no_match(/application/, preloading_module_paths)
125125
end
126126

127127
test "digest" do
128-
assert_match /^\w{40}$/, @importmap.digest(resolver: ApplicationController.helpers)
128+
assert_match(/^\w{40}$/, @importmap.digest(resolver: ApplicationController.helpers))
129129
end
130130

131131
test "separate caches" do

0 commit comments

Comments
 (0)