Sha256: 537979b0e8f9230bca199b9b5cf76740e0cab6aa046dfa0024bc53cd6f8c7d4f

Contents?: true

Size: 861 Bytes

Versions: 3

Compression:

Stored size: 861 Bytes

Contents

require "spec_helper"

describe Stylish::Package do
  let(:library) do
    Stylish::Library.load_from_disk(Stylish.fixtures_path)
    Stylish::Library.loaded.first
  end

  let(:package) do
    library.packages.first
  end

  it "has a manifest" do
    expect(package.manifest.root).to eq(package.root)
  end

  it "has information about the footer components" do
  end

  it "has a relationship to the library" do
    expect(package.library).to eq(library)
  end

  it "creates the folder structure it needs for new packages" do
    begin
      created_package = Stylish::Package.new(name: "Created Theme", library: library)
      created_package.initialize_folder_structure

      expect(created_package.manifest).to be_present
      expect(created_package.root).to be_exist
    ensure
      FileUtils.rm_rf(created_package.root) rescue nil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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