Class: MarkdownExec::TestHashDelegatorMenuChromeOption
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorMenuChromeOption
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_menu_chrome_formatted_option_with_format ⇒ Object
- #test_menu_chrome_formatted_option_without_format ⇒ Object
Instance Method Details
#setup ⇒ Object
4996 4997 4998 4999 5000 5001 5002 5003 |
# File 'lib/hash_delegator.rb', line 4996 def setup @hd = HashDelegator.new @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: "'Back'", menu_chrome_format: '-- %s --' }) HashDelegator.stubs(:safeval).with("'Back'").returns('Back') end |
#test_menu_chrome_formatted_option_with_format ⇒ Object
5005 5006 5007 5008 |
# File 'lib/hash_delegator.rb', line 5005 def assert_equal '-- Back --', @hd.(:menu_option_back_name) end |
#test_menu_chrome_formatted_option_without_format ⇒ Object
5010 5011 5012 5013 5014 5015 |
# File 'lib/hash_delegator.rb', line 5010 def @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: "'Back'" }) assert_equal 'Back', @hd.(:menu_option_back_name) end |