Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 36 lines (29 sloc) 0.859 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
module Jasmine
  module Core
    class << self
      def path
        File.join(File.dirname(__FILE__), "jasmine-core")
      end

      def js_files
        (["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq
      end

      SPEC_TYPES = ["core", "html", "node"]

      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)
        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

      def css_files
        Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) }
      end
    end
  end
end
Something went wrong with that request. Please try again.