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
2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 |
# File 'lib/hash_delegator.rb', line 2995 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
3007 3008 3009 3010 |
# File 'lib/hash_delegator.rb', line 3007 def assert_equal '-- Back --'.red, @hd.(:menu_option_back_name) end |
#test_menu_chrome_colored_option_without_color ⇒ Object
3012 3013 3014 3015 3016 3017 |
# File 'lib/hash_delegator.rb', line 3012 def @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: 'Back' }) assert_equal '-- Back --', @hd.(:menu_option_back_name) end |