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
7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 |
# File 'lib/hash_delegator.rb', line 7040 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
7053 7054 7055 7056 |
# File 'lib/hash_delegator.rb', line 7053 def assert_equal AnsiString.new('-- Back --').red, @hd.(:menu_option_back_name) end |
#test_menu_chrome_colored_option_without_color ⇒ Object
7058 7059 7060 7061 7062 7063 7064 |
# File 'lib/hash_delegator.rb', line 7058 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 |