Sha256: d32e795736412d303f3aa7302c8df96237a566c0e22abe0baadca57796082dd3

Contents?: true

Size: 1.19 KB

Versions: 3

Compression:

Stored size: 1.19 KB

Contents

require "spec_helper"

describe Stylish::Manifest do
  let(:json) do
    Stylish::Manifest.new(Stylish.fixtures_path.join("test-theme","manifest.json"))
  end

  let(:yaml) do
    Stylish::Manifest.new(Stylish.fixtures_path.join("test-theme","manifest.yml"))
  end

  let(:manifest) { json }

  it "accepts a path to a JSON file" do
    expect(json.path).to be_exist
    expect(json.format).to eq("json")
  end

  it "accepts a path to a YAML file" do
    expect(yaml.path).to be_exist
    expect(yaml.format).to eq("yml")
  end

  it "reads the manifest" do
    expect(manifest.name).to eq("Stylish test theme")
    expect(manifest.categories).to include("Headers","Footers","Landing Page Blocks")
  end

  it "has a root folder" do
    expect(manifest.root).to be_exist
    expect(manifest.root).to be_directory
  end

  it "has a templates folder" do
    expect(manifest.templates).to be_directory
    expect(manifest.templates).to be_exist
  end

  it "has a stylesheets folder" do
    expect(manifest.stylesheets).to be_exist
    expect(manifest.stylesheets).to be_directory
  end

  it "has a scripts folder" do
    expect(manifest.scripts).to be_exist
    expect(manifest.scripts).to be_directory
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stylish-0.3.1 spec/lib/stylish/manifest_spec.rb
stylish-0.3.0 spec/lib/stylish/manifest_spec.rb
stylish-0.0.2 spec/lib/stylish/manifest_spec.rb