1
0
forked from extern/nix-config
donovanglover-nix-config/tests/main.cr

37 lines
869 B
Crystal
Raw Normal View History

require "spec"
require "colorize"
2023-06-09 15:06:04 +02:00
require "./spec_helper"
hint = ""
describe "./modules/default.nix" do
it "imports all modules" do
all_modules = Dir.children("modules")
all_modules.delete("default.nix")
modules = File.read("./modules/default.nix")
all_modules.each do |current_module|
hint = "Missing ./#{current_module} import in ./modules/default.nix."
modules.includes?("./#{current_module}").should be_true
end
hint = ""
end
end
2023-06-09 01:11:40 +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
end
Spec.after_suite do
2023-06-09 02:58:08 +02:00
hint.empty? || puts "#{hint}".colorize(:yellow)
end