Class: MarkdownExec::TestHashDelegatorMenuChromeOption

Inherits:
Minitest::Test
  • Object
show all
Defined in:
lib/hash_delegator.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



7068
7069
7070
7071
7072
7073
7074
# File 'lib/hash_delegator.rb', line 7068

def setup
  @hd = HashDelegator.new(
    menu_chrome_format: '-- %s --',
    menu_option_back_name: "'Back'"
  )
  HashDelegator.stubs(:safeval).with("'Back'").returns('Back')
end

#test_menu_chrome_formatted_option_with_formatObject



7076
7077
7078
7079
# File 'lib/hash_delegator.rb', line 7076

def test_menu_chrome_formatted_option_with_format
  assert_equal '-- Back --',
               @hd.menu_chrome_formatted_option(:menu_option_back_name)
end

#test_menu_chrome_formatted_option_without_formatObject



7081
7082
7083
7084
7085
# File 'lib/hash_delegator.rb', line 7081

def test_menu_chrome_formatted_option_without_format
  @hd = HashDelegator.new(menu_option_back_name: "'Back'")
  assert_equal 'Back',
               @hd.menu_chrome_formatted_option(:menu_option_back_name)
end