Sha256: b63ee839000bbb55e96ac5d065d2ec3275393da99c973640f5ce79a5d7fc3da8

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

shared_examples_for "e-book" do
  let(:mybook) { tmpdir.join("mybook") }

  it "generates e-book" do
    mybook.should be_directory
  end

  it "creates images directory" do
    mybook.join("images").should be_directory
  end

  it "creates text directory" do
    mybook.join("text").should be_directory
  end

  it "creates code directory" do
    mybook.join("code").should be_directory
  end

  it "creates template directory" do
    mybook.join("templates").should be_directory
  end

  it "creates configuration file" do
    mybook.join("config/kitabu.yml").should be_file
  end

  it "creates helper file" do
    mybook.join("config/helper.rb").should be_file
  end

  it "copies sample page" do
    mybook.join("text/01_Welcome.md")
  end

  it "copies html template files" do
    mybook.join("templates/html/user.css").should be_file
    mybook.join("templates/html/layout.css").should be_file
    mybook.join("templates/html/layout.erb").should be_file
    mybook.join("templates/html/syntax.css").should be_file
  end

  it "copies epub template files" do
    mybook.join("templates/epub/user.css").should be_file
    mybook.join("templates/epub/cover.erb").should be_file
    mybook.join("templates/epub/cover.png").should be_file
    mybook.join("templates/epub/page.erb").should be_file
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kitabu-1.0.0.rc4 spec/support/shared.rb
kitabu-1.0.0.rc3 spec/support/shared.rb
kitabu-1.0.0.rc2 spec/support/shared.rb