Class: MarkdownExec::TestHashDelegatorStringSendColor

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

Instance Method Summary collapse

Instance Method Details

#setupObject



6933
6934
6935
# File 'lib/hash_delegator.rb', line 6933

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

#test_string_send_colorObject



6937
6938
6939
6940
6941
6942
6943
6944
# File 'lib/hash_delegator.rb', line 6937

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