Skip to content

Commit

Permalink
more descriptive spec test names ... clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
stepheneb committed Mar 2, 2012
1 parent 14ddfad commit f3fd813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The guard statement defines which guard your configuring and sets any optional p
* :convert_on_start - if true will run all conversions when you start the guard. Defaults to true
* :dry_run - if true won't actually run the conversion process, but it will output the files being watched and the file it would write to. Use it to tweak your watch statements and when you're happy set it to false.

If you want to pass additional options directly to kramdown add them as an addition options hash to `kram_ops`.
If you want to pass additional options directly to kramdown add them as an additional options hash to `kram_ops`.

For example to generate a table of contents consisting of headers 2 through 6 first make sure that something like the following is in your markdown source file. This serves as a placeholder which will be replaced with the table of contents. See: [Automatic Table of Contents Generation](http://kramdown.rubyforge.org/converter/html.html#toc).

Expand Down
10 changes: 2 additions & 8 deletions spec/lib/guard/markdown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
end
end

describe "with additional kram_ops" do
it "should use the template when converting the source file" do
describe "with a template file and additional kramdown options" do
it "should use the additional kramdown options and the template when converting the source file" do
file_double = double()
file_double.should_receive(:read).and_return("#Title")
File.should_receive(:open).with("input.md","rb").and_return(file_double)
Expand Down Expand Up @@ -168,9 +168,3 @@ def mock_kramdown text
Kramdown::Document.should_receive(:new).with(text, :input => "kramdown", :output=> "html").and_return(kram_doc)
kram_doc
end

def mock_kramdown_with_kram_ops text
kram_doc = double()
Kramdown::Document.should_receive(:new).with(text, :input => "kramdown", :output=> "html").and_return(kram_doc)
kram_doc
end

0 comments on commit f3fd813

Please sign in to comment.