diff --git a/spec/example/example_order.ttl b/spec/example/example_order.ttl new file mode 100644 index 0000000..64fa977 --- /dev/null +++ b/spec/example/example_order.ttl @@ -0,0 +1,24 @@ + a . + "test title". + a . + "test title 2/". + a . + "test title 2". + a . + "test title 3". + a . + "test title 4". + a . + "test title 5". + a . + "test title 6". + a . + "test title 6". + a . + "test title 6". + a . + "test title 6". + a . + "test title 6". + a . + "test title 6". \ No newline at end of file diff --git a/spec/ttl2html_spec.rb b/spec/ttl2html_spec.rb index 80c68c6..4bce20c 100644 --- a/spec/ttl2html_spec.rb +++ b/spec/ttl2html_spec.rb @@ -782,6 +782,15 @@ html = Capybara.string cont expect(html).to have_css("div.jumbotron div.description") end + it "should output files/dirs accurately, even in parallel execution" do + @ttl2html = TTL2HTML::App.new(File.join(spec_base_dir, "example", "example_content.yml")) + @ttl2html.load_turtle(File.join(spec_base_dir, "example", "example_order.ttl")) + expect { + @ttl2html.output_html_files + }.not_to raise_error + expect(Pathname("/tmp/html/a")).to be_directory + expect(Pathname("/tmp/html/b")).to be_directory + end end context "#output_turtle_files" do ttl2html = nil