Class: MarkdownExec::TestHashDelegatorStringSendColor
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- MarkdownExec::TestHashDelegatorStringSendColor
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
5040 5041 5042 5043 5044 |
# File 'lib/hash_delegator.rb', line 5040 def setup @hd = HashDelegator.new @hd.instance_variable_set(:@delegate_object, { red: 'red', green: 'green' }) end |
#test_string_send_color ⇒ Object
5046 5047 5048 5049 5050 5051 5052 5053 |
# File 'lib/hash_delegator.rb', line 5046 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 |