tests: Add tests for overlays

This commit is contained in:
Donovan Glover 2023-06-10 09:39:41 -04:00
parent c91d02adc0
commit 80e2052651
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ require "spec"
require "./spec_helper"
check_top_level_imports("modules")
check_top_level_imports("overlays")
describe "./overlays/joshuto/default.nix" do
it "uses the latest joshuto commit" do

View File

@ -20,7 +20,7 @@ hint = ""
def check_top_level_imports(directory)
describe "./#{directory}/default.nix" do
it "imports all modules in directory" do
it "imports all modules in ./#{directory}/" do
all_modules = Dir.children(directory)
all_modules.delete("default.nix")
modules = File.read("./#{directory}/default.nix")
@ -33,7 +33,7 @@ def check_top_level_imports(directory)
hint = ""
end
it "only imports modules that exist" do
it "only imports modules that exist in ./#{directory}/" do
all_modules = Dir.children(directory)
all_modules.delete("default.nix")