From f12e7f6c5d4c3783fd72b92927906c0b87a49cc9 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Wed, 17 Apr 2024 23:43:03 +0200 Subject: [PATCH] Add spec --- spec/ameba/glob_utils_spec.cr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/ameba/glob_utils_spec.cr b/spec/ameba/glob_utils_spec.cr index 5c6f289e..153b7909 100644 --- a/spec/ameba/glob_utils_spec.cr +++ b/spec/ameba/glob_utils_spec.cr @@ -41,6 +41,12 @@ module Ameba subject.expand(["**/#{current_file_basename}", "**/#{current_file_basename}"]) .should eq [current_file_path] end + + it "does not list folders" do + subject.expand(["**/*"]).each do |path| + fail "#{path.inspect} should be a file" unless File.file?(path) + end + end end end end