Browse files

Give Jasmine::Core access to jasmine specs

[#13128217]
  • Loading branch information...
1 parent 30431a3 commit 0d43ae9c38b0da159ee8fa8d7c207138e4d44941 @ragaskar ragaskar committed Jun 18, 2011
Showing with 18 additions and 2 deletions.
  1. +1 −2 jasmine-core.gemspec
  2. +16 −0 lib/jasmine-core.rb
  3. +1 −0 lib/jasmine-core/spec
View
3 jasmine-core.gemspec
@@ -13,8 +13,7 @@ Gem::Specification.new do |s|
s.homepage = "http://pivotal.github.com/jasmine"
s.rubyforge_project = "jasmine-core"
- s.files = Dir.glob("./lib/**/*")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.files = Dir.glob("./lib/**/*") + Dir.glob("./lib/jasmine-core/spec/**/*.js")
s.require_paths = ["lib"]
s.add_development_dependency "term-ansicolor"
s.add_development_dependency "json_pure", ">= 1.4.3"
View
16 lib/jasmine-core.rb
@@ -9,6 +9,22 @@ def js_files
(["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq
end
+ def core_spec_files
+ spec_files("core")
+ end
+
+ def html_spec_files
+ spec_files("html")
+ end
+
+ def node_spec_files
+ spec_files("node")
+ end
+
+ def spec_files(type)
+ (Dir.glob(File.join(path, "spec/#{type}/*.js"))).map { |f| File.join("spec", type, File.basename(f)) }.uniq
+ end
+
def css_files
Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) }
end
View
1 lib/jasmine-core/spec

0 comments on commit 0d43ae9

Please sign in to comment.