Class: MarkdownExec::TestHashDelegator::TestHashDelegatorFormatReferencesSendColor
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegator::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
2869 2870 2871 2872 |
# File 'lib/hash_delegator.rb', line 2869 def setup @hd = HashDelegator.new @hd.instance_variable_set(:@delegate_object, {}) end |
#test_format_references_send_color_with_missing_format ⇒ Object
2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 |
# File 'lib/hash_delegator.rb', line 2886 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
2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 |
# File 'lib/hash_delegator.rb', line 2874 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 |