spec/unit/manifest_handler_spec.rb in inqlude-0.8.0 vs spec/unit/manifest_handler_spec.rb in inqlude-0.9.0

- old
+ new

@@ -85,20 +85,34 @@ expect( libraries.count ).to eq 3 expect( libraries.first.manifests.last.name ).to eq "awesomelib" expect( libraries[1].manifests.last.name ).to eq "commercial" end + it "returns latest libraries" do + libraries = mh.latest_libraries + expect(libraries.first.manifests.last.name).to eq "proprietarylib" + expect(libraries).not_to include "newlib" + end + end describe "#group" do it "returns all libraries of a group" do libraries = mh.group("kde-frameworks") expect( libraries.count ).to eq 2 expect( libraries.first.manifests.last.name ).to eq "awesomelib" end end + describe "#topic" do + it "returns all libraries of a topic" do + libraries = mh.topic("API") + expect( libraries.count ).to eq 2 + expect( libraries.first.manifests.last.name ).to eq "awesomelib" + end + end + describe "#library" do it "returns one library" do library = mh.library "awesomelib" expect( library.name ).to eq "awesomelib" @@ -143,9 +157,9 @@ expect( libraries.count ).to eq 0 end end it "generates inqlude-all.json" do - expected_json = File.read(test_data_path("inqlude-all.json")) + expected_json = File.read(test_data_path("inqlude-all.json")).chomp expect(mh.generate_inqlude_all).to eq expected_json end end