2023-06-08 23:14:23 +02:00
|
|
|
require "spec"
|
|
|
|
require "colorize"
|
2023-06-09 15:06:04 +02:00
|
|
|
require "./spec_helper"
|
2023-06-08 23:14:23 +02:00
|
|
|
|
2023-06-09 01:47:44 +02:00
|
|
|
hint = ""
|
|
|
|
|
2023-06-09 01:58:17 +02:00
|
|
|
describe "./modules/default.nix" do
|
|
|
|
it "imports all modules" do
|
2023-06-08 23:14:23 +02:00
|
|
|
all_modules = Dir.children("modules")
|
|
|
|
all_modules.delete("default.nix")
|
|
|
|
modules = File.read("./modules/default.nix")
|
|
|
|
|
|
|
|
all_modules.each do |current_module|
|
2023-06-09 01:47:44 +02:00
|
|
|
hint = "Missing ./#{current_module} import in ./modules/default.nix."
|
2023-06-08 23:14:23 +02:00
|
|
|
modules.includes?("./#{current_module}").should be_true
|
|
|
|
end
|
2023-06-09 01:47:44 +02:00
|
|
|
|
|
|
|
hint = ""
|
2023-06-08 23:14:23 +02:00
|
|
|
end
|
2023-06-09 01:58:17 +02:00
|
|
|
end
|
2023-06-09 01:11:40 +02:00
|
|
|
|
2023-06-09 01:58:17 +02:00
|
|
|
describe "./overlays/joshuto/default.nix" do
|
2023-06-09 01:11:40 +02:00
|
|
|
it "uses the latest joshuto commit" do
|
2023-06-09 15:06:04 +02:00
|
|
|
check_latest_commit("kamiyaa/joshuto", branch: "main")
|
|
|
|
end
|
|
|
|
end
|
2023-06-09 01:11:40 +02:00
|
|
|
|
2023-06-09 15:06:04 +02:00
|
|
|
describe "./overlays/rofi/default.nix" do
|
|
|
|
it "uses the latest rofi-wayland commit" do
|
|
|
|
check_latest_commit("lbonn/rofi", branch: "wayland")
|
2023-06-09 01:11:40 +02:00
|
|
|
end
|
2023-06-08 23:14:23 +02:00
|
|
|
end
|
2023-06-09 01:47:44 +02:00
|
|
|
|
|
|
|
Spec.after_suite do
|
2023-06-09 02:58:08 +02:00
|
|
|
hint.empty? || puts "✗ #{hint}".colorize(:yellow)
|
2023-06-09 01:47:44 +02:00
|
|
|
end
|