Class: MarkdownExec::TestHashDelegator::TestHashDelegatorStringSendColor

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

Instance Method Summary collapse

Instance Method Details

#setupObject



3277
3278
3279
3280
3281
# File 'lib/hash_delegator.rb', line 3277

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

#test_string_send_colorObject



3283
3284
3285
3286
3287
3288
3289
# File 'lib/hash_delegator.rb', line 3283

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