Sha256: 170244d0434257c725cc1f8c29761df7c00829c782ed1ca16efbd0198bb4c43a

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + "/../spec_helper"

describe "Bug Fix" do
  describe "Issue #3" do
    before(:each) do
      ENV["KITABU_ROOT"] = File.dirname(__FILE__) + "/../fixtures/wikipedia"
      ENV["KITABU_NAME"] = "wikipedia"
    end
    
    it "should generate HTML when syntax highlight is disabled" do
      ENV["NO_SYNTAX_HIGHLIGHT"] = "1"
      Kitabu::Base.generate_html
      @html = File.read(Kitabu::Base.root_path + "/output/wikipedia.html")
      @html.should have_tag("h2", :count => 2)
    end
    
    it "should generate HTML when syntax highlight is disabled" do
      ENV.delete("NO_SYNTAX_HIGHLIGHT")
      Kitabu::Base.generate_html
      @html = File.read(Kitabu::Base.root_path + "/output/wikipedia.html")
      @html.should have_tag("h2", :count => 2)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kitabu-0.4.7 spec/kitabu/bug_fix_spec.rb
kitabu-0.4.6 spec/kitabu/bug_fix_spec.rb
kitabu-0.4.5 spec/kitabu/bug_fix_spec.rb