@@ -17,7 +17,7 @@ def test_returns_template_data_with_no_template
1717 lookup_context = Minitest ::Mock . new
1818 lookup_context . expect ( :find_template , mock_template , [ template_identifier ] )
1919
20- template_data = PreviewHelper . find_template_data (
20+ template_data = PreviewHelper . find_template_data_for_preview_source (
2121 lookup_context : lookup_context ,
2222 template_identifier : template_identifier
2323 )
@@ -40,7 +40,7 @@ def test_returns_template_data_with_template_of_different_languages
4040 lookup_context = Minitest ::Mock . new
4141 lookup_context . expect ( :find_template , mock_template , [ template_identifier ] )
4242
43- template_data = PreviewHelper . find_template_data (
43+ template_data = PreviewHelper . find_template_data_for_preview_source (
4444 lookup_context : lookup_context ,
4545 template_identifier : template_identifier
4646 )
@@ -68,7 +68,7 @@ def test_returns_template_data_without_dedicated_template
6868 mock = Minitest ::Mock . new
6969 mock . expect :map , [ expected_template_path ]
7070 ViewComponent ::Base . stub ( :preview_paths , mock ) do
71- template_data = PreviewHelper . find_template_data (
71+ template_data = PreviewHelper . find_template_data_for_preview_source (
7272 lookup_context : lookup_context ,
7373 template_identifier : template_identifier
7474 )
@@ -96,7 +96,7 @@ def test_returns_template_data_with_dedicated_template
9696 mock . expect :map , [ expected_template_path ]
9797 Rails . application . config . view_component . stub ( :preview_paths , mock ) do
9898 File . stub ( :read , expected_source , [ expected_template_path ] ) do
99- template_data = PreviewHelper . find_template_data (
99+ template_data = PreviewHelper . find_template_data_for_preview_source (
100100 lookup_context : lookup_context ,
101101 template_identifier : template_identifier
102102 )
@@ -122,7 +122,7 @@ def test_raises_with_no_matching_template
122122 mock . expect :map , [ ]
123123 Rails . application . config . view_component . stub :preview_paths , mock do
124124 exception = assert_raises ViewComponent ::NoMatchingTemplatesForPreviewError do
125- PreviewHelper . find_template_data (
125+ PreviewHelper . find_template_data_for_preview_source (
126126 lookup_context : lookup_context ,
127127 template_identifier : template_identifier
128128 )
@@ -146,7 +146,7 @@ def test_raises_with_conflict_in_template_resolution
146146 mock . expect :map , [ template_identifier + ".html.haml" , template_identifier + ".html.erb" ]
147147 Rails . application . config . view_component . stub :preview_paths , mock do
148148 exception = assert_raises ViewComponent ::MultipleMatchingTemplatesForPreviewError do
149- PreviewHelper . find_template_data (
149+ PreviewHelper . find_template_data_for_preview_source (
150150 lookup_context : lookup_context ,
151151 template_identifier : template_identifier
152152 )
0 commit comments