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
3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 |
# File 'lib/hash_delegator.rb', line 3149 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
3161 3162 3163 3164 |
# File 'lib/hash_delegator.rb', line 3161 def assert_equal '-- Back --'.red, @hd.(:menu_option_back_name) end |
#test_menu_chrome_colored_option_without_color ⇒ Object
3166 3167 3168 3169 3170 3171 |
# File 'lib/hash_delegator.rb', line 3166 def @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: 'Back' }) assert_equal '-- Back --', @hd.(:menu_option_back_name) end |