Class: MarkdownExec::TestHashDelegatorMenuChromeColoredOption
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorMenuChromeColoredOption
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_menu_chrome_colored_option_with_color ⇒ Object
- #test_menu_chrome_colored_option_without_color ⇒ Object
Instance Method Details
#setup ⇒ Object
6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 |
# File 'lib/hash_delegator.rb', line 6905 def setup @hd = HashDelegator.new( menu_chrome_color: :red, menu_chrome_format: '-- %s --', menu_option_back_name: 'Back' ) @hd.stubs(:menu_chrome_formatted_option) .with(:menu_option_back_name).returns('-- Back --') @hd.stubs(:string_send_color) .with('-- Back --', :menu_chrome_color) .returns(AnsiString.new('-- Back --').red) end |
#test_menu_chrome_colored_option_with_color ⇒ Object
6918 6919 6920 6921 |
# File 'lib/hash_delegator.rb', line 6918 def assert_equal AnsiString.new('-- Back --').red, @hd.(:menu_option_back_name) end |
#test_menu_chrome_colored_option_without_color ⇒ Object
6923 6924 6925 6926 6927 6928 6929 |
# File 'lib/hash_delegator.rb', line 6923 def @hd = HashDelegator.new(menu_option_back_name: 'Back') @hd.stubs(:menu_chrome_formatted_option) .with(:menu_option_back_name).returns('-- Back --') assert_equal '-- Back --', @hd.(:menu_option_back_name) end |