Skip to content

Commit

Permalink
Updated slate_writer_spec.rb to verify correct file created.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpocklin committed May 27, 2016
1 parent 0ebd387 commit 1325f34
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/writers/slate_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@
end
end

describe "#write" do
let(:writer) { described_class.new(index, configuration) }

before do
template_dir = File.join(configuration.template_path, "rspec_api_documentation")
FileUtils.mkdir_p(template_dir)
File.open(File.join(template_dir, "markdown_index.mustache"), "w+") { |f| f << "{{ mustache }}" }
FileUtils.mkdir_p(configuration.docs_dir)
end

it "should write the index" do
writer.write
index_file = File.join(configuration.docs_dir, "index.html.md")
expect(File.exists?(index_file)).to be_truthy
end
end

context 'instance methods' do
let(:writer) { described_class.new(index, configuration) }

Expand Down

0 comments on commit 1325f34

Please sign in to comment.