Better argument handling in Jasmine::Core#spec_files
This commit is contained in:
+4
-1
@@ -9,6 +9,8 @@ module Jasmine
|
|||||||
(["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq
|
(["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
SPEC_TYPES = ["core", "html", "node"]
|
||||||
|
|
||||||
def core_spec_files
|
def core_spec_files
|
||||||
spec_files("core")
|
spec_files("core")
|
||||||
end
|
end
|
||||||
@@ -22,7 +24,8 @@ module Jasmine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def spec_files(type)
|
def spec_files(type)
|
||||||
(Dir.glob(File.join(path, "spec/#{type}/*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq
|
raise ArgumentError.new("Unrecognized spec type") unless SPEC_TYPES.include?(type)
|
||||||
|
(Dir.glob(File.join(path, "spec", type, "*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
def css_files
|
def css_files
|
||||||
|
|||||||
@@ -2472,5 +2472,5 @@ jasmine.version_= {
|
|||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 1,
|
"minor": 1,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1308358300
|
"revision": 1308404354
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@ jasmine.version_= {
|
|||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 1,
|
"minor": 1,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1308358300
|
"revision": 1308404354
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user