Sha256: a13c2406ccf05f066e332034a269ecd3c57cf982b29dcd55cecf46ab45c6deb8

Contents?: true

Size: 1.34 KB

Versions: 9

Compression:

Stored size: 1.34 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 Guardfile" do
    mybook.join("Guardfile")
  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

9 entries across 9 versions & 2 rubygems

Version Path
kitabu-1.0.5 spec/support/shared.rb
tacape-0.0.6 spec/support/shared.rb
tacape-0.0.4 spec/support/shared.rb
tacape-0.0.3 spec/support/shared.rb
kitabu-1.0.4 spec/support/shared.rb
kitabu-1.0.3 spec/support/shared.rb
kitabu-1.0.2 spec/support/shared.rb
kitabu-1.0.1 spec/support/shared.rb
kitabu-1.0.0 spec/support/shared.rb