Class: MarkdownExec::TestHashDelegatorAppendDivider
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorAppendDivider
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_append_divider_final ⇒ Object
- #test_append_divider_initial ⇒ Object
- #test_append_divider_without_format ⇒ Object
Instance Method Details
#setup ⇒ Object
4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 |
# File 'lib/hash_delegator.rb', line 4381 def setup @hd = HashDelegator.new @hd.instance_variable_set(:@delegate_object, { menu_divider_format: 'Format', menu_initial_divider: 'Initial Divider', menu_final_divider: 'Final Divider', menu_divider_color: :color }) @hd.stubs(:string_send_color).returns('Formatted Divider') HashDelegator.stubs(:safeval).returns('Safe Value') end |
#test_append_divider_final ⇒ Object
4401 4402 4403 4404 4405 4406 4407 |
# File 'lib/hash_delegator.rb', line 4401 def test_append_divider_final = [] @hd.append_divider(menu_blocks: , position: :final) assert_equal 1, .size assert_equal 'Formatted Divider', .last.dname end |
#test_append_divider_initial ⇒ Object
4393 4394 4395 4396 4397 4398 4399 |
# File 'lib/hash_delegator.rb', line 4393 def test_append_divider_initial = [] @hd.append_divider(menu_blocks: , position: :initial) assert_equal 1, .size assert_equal 'Formatted Divider', .first.dname end |
#test_append_divider_without_format ⇒ Object
4409 4410 4411 4412 4413 4414 4415 |
# File 'lib/hash_delegator.rb', line 4409 def test_append_divider_without_format @hd.instance_variable_set(:@delegate_object, {}) = [] @hd.append_divider(menu_blocks: , position: :initial) assert_empty end |