Class: MarkdownExec::TestHashDelegator::TestHashDelegatorMenuChromeFormattedOptionWithoutFormat
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegator::TestHashDelegatorMenuChromeFormattedOptionWithoutFormat
- 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
3119 3120 3121 3122 3123 3124 3125 3126 |
# File 'lib/hash_delegator.rb', line 3119 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
3128 3129 3130 3131 |
# File 'lib/hash_delegator.rb', line 3128 def assert_equal '-- Back --', @hd.(:menu_option_back_name) end |
#test_menu_chrome_formatted_option_without_format ⇒ Object
3133 3134 3135 3136 3137 3138 |
# File 'lib/hash_delegator.rb', line 3133 def @hd.instance_variable_set(:@delegate_object, { menu_option_back_name: "'Back'" }) assert_equal 'Back', @hd.(:menu_option_back_name) end |