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
6776 6777 6778 |
# File 'lib/hash_delegator.rb', line 6776 def setup @hd = HashDelegator.new end |
#test_format_references_send_color_with_missing_format ⇒ Object
6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 |
# File 'lib/hash_delegator.rb', line 6794 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
6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 |
# File 'lib/hash_delegator.rb', line 6780 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 |