Class: MarkdownExec::TestHashDelegatorFormatReferencesSendColor
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorFormatReferencesSendColor
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_format_references_send_color_with_missing_format ⇒ Object
- #test_format_references_send_color_with_valid_data ⇒ Object
Instance Method Details
#setup ⇒ Object
6641 6642 6643 |
# File 'lib/hash_delegator.rb', line 6641 def setup @hd = HashDelegator.new end |
#test_format_references_send_color_with_missing_format ⇒ Object
6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 |
# File 'lib/hash_delegator.rb', line 6659 def test_format_references_send_color_with_missing_format @hd.instance_variable_get(:@delegate_object).stubs(:fetch).with( :output_execution_label_format, '' ).returns('') @hd.stubs(:string_send_color).returns('Default Colored String') result = @hd.format_references_send_color( context: { key: 'value' }, color_sym: :execution_report_preview_frame_color ) assert_equal 'Default Colored String', result end |
#test_format_references_send_color_with_valid_data ⇒ Object
6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 |
# File 'lib/hash_delegator.rb', line 6645 def test_format_references_send_color_with_valid_data @hd.instance_variable_get(:@delegate_object).stubs(:fetch).with( :output_execution_label_format, '' ).returns('Formatted: %{key}') @hd.stubs(:string_send_color).returns('Colored String') result = @hd.format_references_send_color( context: { key: 'value' }, color_sym: :execution_report_preview_frame_color ) assert_equal 'Colored String', result end |