Class: MarkdownExec::TestHashDelegatorMenuChromeOption

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

Instance Method Summary collapse

Instance Method Details

#setupObject



6933
6934
6935
6936
6937
6938
6939
# File 'lib/hash_delegator.rb', line 6933

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



6941
6942
6943
6944
# File 'lib/hash_delegator.rb', line 6941

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



6946
6947
6948
6949
6950
# File 'lib/hash_delegator.rb', line 6946

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