Module: JsSpec::Resources::Spec

Included in:
JsTestCore::Resources::Specs::SpecDir, JsTestCore::Resources::Specs::SpecFile
Defined in:
lib/js_spec/resources/spec.rb

Instance Method Summary collapse

Instance Method Details

#getObject



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
# File 'lib/js_spec/resources/spec.rb', line 4

def get
  html = "  <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n  <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"ko\">\n  <head>\n  <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\" />\n  <title>JSSpec results</title>\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"/core/JSSpec.css\" />\n  <script type=\"text/javascript\" src=\"/core/diff_match_patch.js\"></script>\n  <script type=\"text/javascript\" src=\"/core/JSSpec.js\"></script>\n  <script type=\"text/javascript\" src=\"/core/JSSpecExtensions.js\"></script>\n  HTML\n  spec_files.each do |file|\n    html << %{<script type=\"text/javascript\" src=\"\#{file.relative_path}\"></script>\\n}\n  end\n\n  html << <<-HTML\n  </head>\n  <body>\n  <div id=\"js_spec_content\"></div>\n  </body>\n  </html>\n  HTML\n  connection.send_head\n  connection.send_body(html.gsub(/^        /, \"\"))\nend\n"