Class: MarkdownExec::PathUtilsTest
- Defined in:
- lib/hash_delegator.rb
Instance Method Summary collapse
- #test_absolute_path_returns_unchanged ⇒ Object
- #test_empty_path_substitution ⇒ Object
-
#test_format_utf8_characters ⇒ Object
Test formatting a string containing UTF-8 characters.
- #test_path_with_no_slash_substitutes_correctly ⇒ Object
- #test_relative_path_gets_substituted ⇒ Object
Instance Method Details
#test_absolute_path_returns_unchanged ⇒ Object
3410 3411 3412 3413 3414 |
# File 'lib/hash_delegator.rb', line 3410 def test_absolute_path_returns_unchanged absolute_path = '/usr/local/bin' expression = 'path/to/*/directory' assert_equal absolute_path, PathUtils.resolve_path_or_substitute(absolute_path, expression) end |
#test_empty_path_substitution ⇒ Object
3430 3431 3432 3433 3434 3435 |
# File 'lib/hash_delegator.rb', line 3430 def test_empty_path_substitution empty_path = '' expression = 'path/to/*/directory' expected_output = 'path/to//directory' assert_equal expected_output, PathUtils.resolve_path_or_substitute(empty_path, expression) end |
#test_format_utf8_characters ⇒ Object
Test formatting a string containing UTF-8 characters
3438 3439 3440 3441 3442 |
# File 'lib/hash_delegator.rb', line 3438 def test_format_utf8_characters input = 'Unicode test: Δ, ΓΆ, π», and π are fun!' expected = '# Unicode test: Δ, ΓΆ, π», and π are fun!' assert_equal expected, BashCommentFormatter.format_comment(input) end |
#test_path_with_no_slash_substitutes_correctly ⇒ Object
3423 3424 3425 3426 3427 3428 |
# File 'lib/hash_delegator.rb', line 3423 def test_path_with_no_slash_substitutes_correctly relative_path = 'data' expression = 'path/to/*/directory' expected_output = 'path/to/data/directory' assert_equal expected_output, PathUtils.resolve_path_or_substitute(relative_path, expression) end |
#test_relative_path_gets_substituted ⇒ Object
3416 3417 3418 3419 3420 3421 |
# File 'lib/hash_delegator.rb', line 3416 def test_relative_path_gets_substituted relative_path = 'my_folder' expression = 'path/to/*/directory' expected_output = 'path/to/my_folder/directory' assert_equal expected_output, PathUtils.resolve_path_or_substitute(relative_path, expression) end |