Sha256: 75a87f377f6145d40a48d48216ba5bffc93ed57fb745850e6a6ab5cf7c87b2b6

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

require File.expand_path("../../spec_helper", __FILE__)

module Playgroundbook
  describe ContentsManifestGenerator do
    include FakeFS::SpecHelpers
    let(:generator) { ContentsManifestGenerator.new(test_ui) }
    let(:test_ui) { Cork::Board.new(silent: true) }

    it "creates the manifest file" do
      generator.generate(test_book_metadata)

      expect(File.exist?("Manifest.plist")).to be_truthy
    end

    describe "the manifest file" do
      before do
        generator.generate(test_book_metadata)
      end

      it "has a book name" do
        expect(get_manifest["Name"]).to eq("Testing Book")
      end

      it "has an identifier" do
        expect(get_manifest["ContentIdentifier"]).to eq("com.ashfurrow.testing")
      end

      it "has a deployment target" do
        expect(get_manifest["DeploymentTarget"]).to eq("ios10.0")
      end

      it "has chapters specified" do
        expect(get_manifest["Chapters"]).to eq(["test_chapter.playgroundchapter"])
      end

      it "has a ImageReference" do
        expect(get_manifest["ImageReference"]).to eq("file.jpeg")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playgroundbook-0.6.0 spec/renderer/contents_manfiest_generator_spec.rb
playgroundbook-0.4.0 spec/renderer/contents_manfiest_generator_spec.rb