1
0
forked from extern/nix-config
donovanglover-nix-config/tests/main.cr
Donovan Glover d137d3342c
meta: Add tests
Tests help guarantee that I don't forget to do something that I should
have done, such as importing a certain nix module.
2023-06-08 17:15:58 -04:00

17 lines
446 B
Crystal

require "spec"
require "colorize"
describe "nix-config" do
it "includes 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|
print "Checking ./modules/#{current_module}...".colorize(:blue)
modules.includes?("./#{current_module}").should be_true
puts "".colorize(:green)
end
end
end