Sha256: f53408a7a9b78f380d31292580ec7a1d52f861f642e5a2fcecc785d1431b5b64
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
require "spec_helper" describe Stylish::Library do let(:library) do Stylish::Library.load_from_disk(Stylish.fixtures_path, reset: true) Stylish::Library.loaded.first end it "has some libraries loaded" do needle = library haystack = Stylish::Library.loaded expect(haystack).to include(needle) end it "lists all of the packages in the library" do expect(library.packages).not_to be_empty expect(library.packages.first).to be_a(Stylish::Package) end it "has a name of the packages" do expect(library.packages.map(&:name)).to include("Stylish test theme") end it "lets me find a package by name" do expect(library.find_package("Stylish test theme")).to be_a(Stylish::Package) end it "lets me find a package by slug" do pkg = library.find_package("stylish-test-theme") expect(pkg).to be_a(Stylish::Package) end it "lets me find a package by the root" do lib = Stylish::Library.find_by_root(Stylish.fixtures_path.join('test-theme')) expect(lib).to be_present end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stylish-0.3.1 | spec/lib/stylish/models/library_spec.rb |
stylish-0.3.0 | spec/lib/stylish/models/library_spec.rb |
stylish-0.0.2 | spec/lib/stylish/models/library_spec.rb |