Class: JsTestServer::Server::Views::Suites::ScrewUnit

Inherits:
JsTestServer::Server::Views::Suite show all
Defined in:
lib/js_test_server/server/views/suites/screw_unit.html.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JsTestServer::Server::Views::Suite

project_css_files, project_css_files=, project_js_files, project_js_files=

Methods inherited from Page

#content

Class Attribute Details

.jquery_js_fileObject

Returns the value of attribute jquery_js_file.



3
4
5
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 3

def jquery_js_file
  @jquery_js_file
end

Instance Attribute Details

#framework_pathObject (readonly)

Returns the value of attribute framework_path.



7
8
9
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 7

def framework_path
  @framework_path
end

#spec_filesObject (readonly)

Returns the value of attribute spec_files.



7
8
9
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 7

def spec_files
  @spec_files
end

Instance Method Details

#body_contentObject



41
42
43
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 41

def body_content
  div :id => "screw_unit_content"
end

#core_js_filesObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 22

def core_js_files
  javascript :src => jquery_js_file
  javascript :src => "/js_test_server.js"
  javascript :src => "/framework/jquery.fn.js"
  javascript :src => "/framework/jquery.print.js"
  javascript :src => "/framework/screw.builder.js"
  javascript :src => "/framework/screw.matchers.js"
  javascript :src => "/framework/screw.events.js"
  javascript :src => "/framework/screw.behaviors.js"
  javascript :src => "/js_test_server/screw_unit_driver.js"
end

#head_contentObject



13
14
15
16
17
18
19
20
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 13

def head_content
  core_js_files
  project_js_files
  link :rel => "stylesheet", :href => "/framework/screw.css"
  project_css_files

  spec_script_elements
end

#jquery_js_fileObject



34
35
36
37
38
39
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 34

def jquery_js_file
  self.class.jquery_js_file || (
    (jquery_path = Dir["#{framework_path}/jquery-*.js"].sort.last) &&
      "/framework/#{File.basename(jquery_path)}"
  )
end

#title_textObject



9
10
11
# File 'lib/js_test_server/server/views/suites/screw_unit.html.rb', line 9

def title_text
  "Screw Unit suite"
end