Class: MarkdownExec::TestHashDelegator::TestHashDelegatorMenuChromeColoredOption
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegator::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
3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 |
# File 'lib/hash_delegator.rb', line 3093 def setup @hd = HashDelegator.new @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: 'Back', menu_chrome_color: :red, menu_chrome_format: '-- %s --' }) @hd.stubs(:menu_chrome_formatted_option).with(:menu_option_back_name).returns('-- Back --') @hd.stubs(:string_send_color).with('-- Back --', :menu_chrome_color).returns('-- Back --'.red) end |
#test_menu_chrome_colored_option_with_color ⇒ Object
3105 3106 3107 3108 |
# File 'lib/hash_delegator.rb', line 3105 def assert_equal '-- Back --'.red, @hd.(:menu_option_back_name) end |
#test_menu_chrome_colored_option_without_color ⇒ Object
3110 3111 3112 3113 3114 3115 |
# File 'lib/hash_delegator.rb', line 3110 def @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: 'Back' }) assert_equal '-- Back --', @hd.(:menu_option_back_name) end |