Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStringSendColor

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3163
3164
3165
3166
3167
# File 'lib/hash_delegator.rb', line 3163

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

#test_string_send_colorObject



3169
3170
3171
3172
3173
3174
3175
# File 'lib/hash_delegator.rb', line 3169

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