Module: JasmineRails::SpecRunnerHelper

Defined in:
app/helpers/jasmine_rails/spec_runner_helper.rb

Instance Method Summary collapse

Instance Method Details

#jasmine2?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'app/helpers/jasmine_rails/spec_runner_helper.rb', line 38

def jasmine2?
  Jasmine::Core.respond_to?(:boot_files)
end

#jasmine_boot_fileObject



30
31
32
33
34
35
36
# File 'app/helpers/jasmine_rails/spec_runner_helper.rb', line 30

def jasmine_boot_file
  if jasmine2?
    Jasmine::Core.boot_files.first
  else
    'jasmine-boot.js'
  end
end

#jasmine_css_filesObject

return list of css files to include in spec runner all files are fetched through the Rails asset pipeline includes:

  • core jasmine css files



9
10
11
12
13
# File 'app/helpers/jasmine_rails/spec_runner_helper.rb', line 9

def jasmine_css_files
  files = Jasmine::Core.css_files
  files << 'jasmine-specs.css'
  files
end

#jasmine_js_filesObject

return list of javascript files needed for jasmine testsuite all files are fetched through the Rails asset pipeline includes:

  • core jasmine libraries

  • (optional) reporter libraries

  • jasmine-boot.js test runner

  • jasmine-specs.js built by asset pipeline which merges application specific libraries and specs



22
23
24
25
26
27
28
# File 'app/helpers/jasmine_rails/spec_runner_helper.rb', line 22

def jasmine_js_files
  files = Jasmine::Core.js_files
  files << jasmine_boot_file
  files += JasmineRails.reporter_files params[:reporters]
  files << 'jasmine-specs.js'
  files
end