Compare commits
2 Commits
5403aee899
...
f12e7f6c5d
Author | SHA1 | Date |
---|---|---|
Sijawusz Pur Rahnama | f12e7f6c5d | |
Sijawusz Pur Rahnama | 1bd59c1bf0 |
|
@ -1,11 +1,7 @@
|
|||
require "../spec_helper"
|
||||
|
||||
module Ameba
|
||||
struct GlobUtilsClass
|
||||
include GlobUtils
|
||||
end
|
||||
|
||||
subject = GlobUtilsClass.new
|
||||
subject = GlobUtils
|
||||
current_file_basename = File.basename(__FILE__)
|
||||
current_file_path = "spec/ameba/#{current_file_basename}"
|
||||
|
||||
|
@ -45,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
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
module Ameba
|
||||
# Helper module that is utilizes helpers for working with globs.
|
||||
module GlobUtils
|
||||
extend self
|
||||
|
||||
# Returns all files that match specified globs.
|
||||
# Globs can have wildcards or be rejected:
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue