Module: Jasmine::Core
- Defined in:
- lib/jasmine-core.rb,
lib/jasmine-core/version.rb
Constant Summary collapse
- SPEC_TYPES =
["core", "html", "node"]
- VERSION =
"3.99.0"
Class Method Summary collapse
- .boot_dir ⇒ Object
- .boot_files ⇒ Object
- .core_spec_files ⇒ Object
- .css_files ⇒ Object
- .html_spec_files ⇒ Object
- .images_dir ⇒ Object
- .js_files ⇒ Object
- .node_boot_files ⇒ Object
- .node_spec_files ⇒ Object
- .path ⇒ Object
- .spec_files(type) ⇒ Object
Class Method Details
.boot_dir ⇒ Object
59 60 61 |
# File 'lib/jasmine-core.rb', line 59 def boot_dir path end |
.boot_files ⇒ Object
51 52 53 |
# File 'lib/jasmine-core.rb', line 51 def boot_files ["boot0.js", "boot1.js"] end |
.core_spec_files ⇒ Object
39 40 41 |
# File 'lib/jasmine-core.rb', line 39 def core_spec_files spec_files("core") end |
.css_files ⇒ Object
68 69 70 |
# File 'lib/jasmine-core.rb', line 68 def css_files Dir.glob(File.join(path, "*.css")).map { |f| File.basename(f) } end |
.html_spec_files ⇒ Object
43 44 45 |
# File 'lib/jasmine-core.rb', line 43 def html_spec_files spec_files("html") end |
.images_dir ⇒ Object
72 73 74 |
# File 'lib/jasmine-core.rb', line 72 def images_dir File.join(File.dirname(__FILE__), '../images') end |
.js_files ⇒ Object
33 34 35 |
# File 'lib/jasmine-core.rb', line 33 def js_files (["jasmine.js"] + Dir.glob(File.join(path, "*.js"))).map { |f| File.basename(f) }.uniq - boot_files - ["boot0.js", "boot1.js"] - node_boot_files end |
.node_boot_files ⇒ Object
55 56 57 |
# File 'lib/jasmine-core.rb', line 55 def node_boot_files ["node_boot.js"] end |
.node_spec_files ⇒ Object
47 48 49 |
# File 'lib/jasmine-core.rb', line 47 def node_spec_files spec_files("node") end |
.path ⇒ Object
29 30 31 |
# File 'lib/jasmine-core.rb', line 29 def path File.join(File.dirname(__FILE__), "jasmine-core") end |
.spec_files(type) ⇒ Object
63 64 65 66 |
# File 'lib/jasmine-core.rb', line 63 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 |