File tree Expand file tree Collapse file tree
lib/generators/view_component/component/templates
test/sandbox/test/generators Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33<% module_namespacing do -%>
44class <%= class_name %><%= options[:skip_suffix] ? "" : "Component" %> < <%= parent_class %>
55<%- if inline_template? -%>
6- <%= template_engine %>_template <<~ERB
6+ <%= template_engine %>_template <<~<%= template_engine.upcase %>
77 <h1>Hello, World!</h1>
8- ERB
8+ <%= template_engine.upcase %>
99<%- end -%>
1010<%- if initialize_signature? -%>
1111 def initialize(<%= initialize_signature %>)
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def test_invoking_slim_template_engine_inline
142142 run_generator %w[ user --inline --template-engine slim ]
143143
144144 assert_file "app/components/user_component.rb" do |component |
145- assert_match ( /slim_template/ , component )
145+ assert_match ( /slim_template <<~SLIM / , component )
146146 end
147147
148148 assert_no_file "app/components/user_component.html.slim"
You can’t perform that action at this time.
0 commit comments