diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2014-02-28 20:20:53 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2014-02-28 20:20:53 -0700 |
| commit | 04b7eb416cd17b61d58e7199577bc89de36ab630 (patch) | |
| tree | 440c8845567b54dfeaf269293083532893275594 /test | |
| parent | fd788825995c2d984ff22dc28b6876f8d9c0b8f1 (diff) | |
cloning of options & attributes is now handled in main APIs
- don't clone options/attributes in cli
- test to ensure options/attributes aren't modified when processing multiple files
Diffstat (limited to 'test')
| -rw-r--r-- | test/invoker_test.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/invoker_test.rb b/test/invoker_test.rb index efbb943c..7a676bdb 100644 --- a/test/invoker_test.rb +++ b/test/invoker_test.rb @@ -278,7 +278,7 @@ context 'Invoker' do basic_outpath = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'basic.html')) sample_outpath = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'sample.html')) begin - invoke_cli_with_filenames %w(), %w(basic.asciidoc sample.asciidoc) + invoke_cli_with_filenames [], %w(basic.asciidoc sample.asciidoc) assert File.exist?(basic_outpath) assert File.exist?(sample_outpath) ensure @@ -287,10 +287,25 @@ context 'Invoker' do end end + test 'options should not be modified when processing multiple files' do + destination_path = File.expand_path(File.join(File.dirname(__FILE__), 'test_output')) + basic_outpath = File.join(destination_path, 'basic.htm') + sample_outpath = File.join(destination_path, 'sample.htm') + begin + invoke_cli_with_filenames %w(-D test/test_output -a outfilesuffix=.htm), %w(basic.asciidoc sample.asciidoc) + assert File.exist?(basic_outpath) + assert File.exist?(sample_outpath) + ensure + FileUtils.rm_f(basic_outpath) + FileUtils.rm_f(sample_outpath) + FileUtils.rmdir(destination_path) + end + end + test 'should render all files that matches a glob expression' do basic_outpath = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'basic.html')) begin - invoke_cli_to_buffer %w(), "ba*.asciidoc" + invoke_cli_to_buffer [], "ba*.asciidoc" assert File.exist?(basic_outpath) ensure FileUtils.rm_f(basic_outpath) @@ -306,7 +321,7 @@ context 'Invoker' do end begin - invoke_cli_to_buffer %w(), glob + invoke_cli_to_buffer [], glob assert File.exist?(basic_outpath) ensure FileUtils.rm_f(basic_outpath) |
