diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2013-08-22 03:08:28 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2013-08-22 03:08:28 -0600 |
| commit | c0db091965fa01f10c5c2f5b27e6cde492b91b60 (patch) | |
| tree | a5262527a213a832d088281eb174196a172c4021 /test/paths_test.rb | |
| parent | 2d26e534c05464af7a0703951b4567b2e3945fa3 (diff) | |
extension improvements
- make Preprocessor operate on Reader instead of just lines
- add template_name to Inline; make property writable for all node types
- add a finalize_header method to handle preparing to parse body
- spec out idea for preserialize processor
- update tests
Diffstat (limited to 'test/paths_test.rb')
| -rw-r--r-- | test/paths_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/paths_test.rb b/test/paths_test.rb index 35e84ec1..acb24602 100644 --- a/test/paths_test.rb +++ b/test/paths_test.rb @@ -181,4 +181,16 @@ context 'Path Resolver' do assert_equal 'part1/chapter1/section1.adoc', @resolver.relative_path(filename, JAIL) end end + + context 'Helpers' do + test 'rootname should return file name without extension' do + assert_equal 'master', Asciidoctor::Helpers.rootname('master.adoc') + assert_equal 'docs/master', Asciidoctor::Helpers.rootname('docs/master.adoc') + end + + test 'rootname should file name if it has no extension' do + assert_equal 'master', Asciidoctor::Helpers.rootname('master') + assert_equal 'docs/master', Asciidoctor::Helpers.rootname('docs/master') + end + end end |
