diff --git a/test/sandbox/app/components/header_component.rb b/test/sandbox/app/components/header_component.rb deleted file mode 100644 index 8a8d8406c..000000000 --- a/test/sandbox/app/components/header_component.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -class HeaderComponent < ViewComponent::Base - renders_one :callout_title -end diff --git a/test/sandbox/test/slotable_test.rb b/test/sandbox/test/slotable_test.rb index dc3c1f6b8..086f418e5 100644 --- a/test/sandbox/test/slotable_test.rb +++ b/test/sandbox/test/slotable_test.rb @@ -720,7 +720,7 @@ def test_slot_with_content_shorthand assert component.title.content? end - def test_slot_names_can_not_start_with_call_ + def test_slot_names_cannot_start_with_call_ assert_raises ViewComponent::InvalidSlotNameError do Class.new(ViewComponent::Base) do renders_one :call_out_title @@ -733,4 +733,12 @@ def test_slot_names_can_not_start_with_call_ end end end + + def test_slot_names_can_start_with_call + assert_nothing_raised do + Class.new(ViewComponent::Base) do + renders_one :callhome_et + end + end + end end