Ensure test cleanup occurs

This commit is contained in:
Stuart Frost 2023-08-05 19:28:58 +01:00
parent 1b85ba6f22
commit f96cb01015

View file

@ -16,11 +16,12 @@ module Ameba
config.globs.should eq ["**/*.cr"] config.globs.should eq ["**/*.cr"]
end end
it "only sets !lib as a default glob when there are .cr files in lib" do it "sets !lib as a default glob when there are .cr files in lib" do
File.touch "lib/shard.cr" File.touch "lib/shard.cr"
yml = YAML.parse "{}" yml = YAML.parse "{}"
config = Config.new(yml) config = Config.new(yml)
config.globs.should eq ["**/*.cr", "!lib"] config.globs.should eq ["**/*.cr", "!lib"]
ensure
File.delete "lib/shard.cr" File.delete "lib/shard.cr"
end end
end end