mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-25 01:33:17 +01:00
tests: Add tests for overlays
This commit is contained in:
parent
c91d02adc0
commit
80e2052651
@ -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
|
||||
|
@ -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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user