Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1325f34

Browse files
committedMay 27, 2016
Updated slate_writer_spec.rb to verify correct file created.
1 parent 0ebd387 commit 1325f34

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
 

‎spec/writers/slate_writer_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@
1515
end
1616
end
1717

18+
describe "#write" do
19+
let(:writer) { described_class.new(index, configuration) }
20+
21+
before do
22+
template_dir = File.join(configuration.template_path, "rspec_api_documentation")
23+
FileUtils.mkdir_p(template_dir)
24+
File.open(File.join(template_dir, "markdown_index.mustache"), "w+") { |f| f << "{{ mustache }}" }
25+
FileUtils.mkdir_p(configuration.docs_dir)
26+
end
27+
28+
it "should write the index" do
29+
writer.write
30+
index_file = File.join(configuration.docs_dir, "index.html.md")
31+
expect(File.exists?(index_file)).to be_truthy
32+
end
33+
end
34+
1835
context 'instance methods' do
1936
let(:writer) { described_class.new(index, configuration) }
2037

0 commit comments

Comments
 (0)
Please sign in to comment.