Class: MarkdownExec::TestHashDelegatorStringSendColor

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

Instance Method Summary collapse

Instance Method Details

#setupObject



6977
6978
6979
# File 'lib/hash_delegator.rb', line 6977

def setup
  @hd = HashDelegator.new(red: 'red', green: 'green')
end

#test_string_send_colorObject



6981
6982
6983
6984
6985
6986
6987
6988
# File 'lib/hash_delegator.rb', line 6981

def test_string_send_color
  assert_equal AnsiString.new('Hello').red,
               @hd.string_send_color('Hello', :red)
  assert_equal AnsiString.new('World').green,
               @hd.string_send_color('World', :green)
  assert_equal AnsiString.new('Default').plain,
               @hd.string_send_color('Default', :blue)
end