hanoi 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,120 @@
1
+ body, div, h1 { font-family: 'trebuchet ms', verdana, arial; margin: 0; padding: 0 }
2
+ body {font-size: 10pt; }
3
+ h1 { padding: 15px; font-size: large; background-color: #06b; color: white; }
4
+ h1 a { color: white; }
5
+ h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }
6
+
7
+ .pass { color: green; }
8
+ .fail { color: red; }
9
+ p.result { margin-left: 1em; }
10
+
11
+ #banner { height: 2em; border-bottom: 1px solid white; }
12
+ h2.pass { background-color: green; }
13
+ h2.fail { background-color: red; }
14
+
15
+ div.testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; }
16
+
17
+ ol#tests > li > strong { cursor:pointer; }
18
+
19
+ div#fx-tests h4 {
20
+ background: red;
21
+ }
22
+
23
+ div#fx-tests h4.pass {
24
+ background: green;
25
+ }
26
+
27
+ div#fx-tests div.box {
28
+ background: red url(data/cow.jpg) no-repeat;
29
+ overflow: hidden;
30
+ border: 2px solid #000;
31
+ }
32
+
33
+ div#fx-tests div.overflow {
34
+ overflow: visible;
35
+ }
36
+
37
+ div.inline {
38
+ display: inline;
39
+ }
40
+
41
+ div.autoheight {
42
+ height: auto;
43
+ }
44
+
45
+ div.autowidth {
46
+ width: auto;
47
+ }
48
+
49
+ div.autoopacity {
50
+ opacity: auto;
51
+ }
52
+
53
+ div.largewidth {
54
+ width: 100px;
55
+ }
56
+
57
+ div.largeheight {
58
+ height: 100px;
59
+ }
60
+
61
+ div.largeopacity {
62
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
63
+ }
64
+
65
+ div.medwidth {
66
+ width: 50px;
67
+ }
68
+
69
+ div.medheight {
70
+ height: 50px;
71
+ }
72
+
73
+ div.medopacity {
74
+ opacity: 0.5;
75
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
76
+ }
77
+
78
+ div.nowidth {
79
+ width: 0px;
80
+ }
81
+
82
+ div.noheight {
83
+ height: 0px;
84
+ }
85
+
86
+ div.noopacity {
87
+ opacity: 0;
88
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
89
+ }
90
+
91
+ div.hidden {
92
+ display: none;
93
+ }
94
+
95
+ div#fx-tests div.widewidth {
96
+ background-repeat: repeat-x;
97
+ }
98
+
99
+ div#fx-tests div.wideheight {
100
+ background-repeat: repeat-y;
101
+ }
102
+
103
+ div#fx-tests div.widewidth.wideheight {
104
+ background-repeat: repeat;
105
+ }
106
+
107
+ div#fx-tests div.noback {
108
+ background-image: none;
109
+ }
110
+
111
+ div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }
112
+ div.chain div { position: absolute; top: 0px; left: 0px; }
113
+
114
+ div.chain.test { background: red; }
115
+ div.chain.test div { background: green; }
116
+
117
+ div.chain.out { background: green; }
118
+ div.chain.out div { background: red; display: none; }
119
+
120
+ div#show-tests * { display: none; }
@@ -0,0 +1,3 @@
1
+ <p id="sample">
2
+ sample paragraph
3
+ </div>
@@ -0,0 +1,4 @@
1
+ module("example");
2
+ test("should test the truth", function() {
3
+ ok(true, "should be true");
4
+ });
@@ -0,0 +1,15 @@
1
+ require "rubygems"
2
+ require "hanoi"
3
+
4
+ namespace :test do
5
+ desc "Runs all the JavaScript tests and collects the results"
6
+ JavaScriptTestTask.new(:js) do |t|
7
+ test_cases = ENV['TESTS'] && ENV['TESTS'].split(',')
8
+ browsers = ENV['BROWSERS'] && ENV['BROWSERS'].split(',')
9
+ # change this path according to your configuration,
10
+ # it should indicate the root directory of your JavaScript files
11
+ sources_directory = File.expand_path(File.dirname(__FILE__) + "/src")
12
+
13
+ t.setup(sources_directory, test_cases, browsers)
14
+ end
15
+ end
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title><%= "#{@test_case.name} - Hanoi" %></title>
7
+
8
+ <script src="/jquery.js" type="text/javascript" charset="utf-8"></script>
9
+ <script src="/testrunner.js" type="text/javascript" charset="utf-8"></script>
10
+ <link rel="stylesheet" href="/testsuite.css" type="text/css" media="screen" charset="utf-8">
11
+
12
+ <script src="<%= @test_case.target %>" type="text/javascript" charset="utf-8"></script>
13
+
14
+ <script type="text/javascript" charset="utf-8">
15
+ $(document).ready(function(){
16
+ <%= @test_case.content %>
17
+ });
18
+ </script>
19
+
20
+ </head>
21
+ <body>
22
+ <h1><%= "#{@test_case.name.upcase}" %></h1>
23
+ <h2 id="banner"></h2>
24
+ <h2 id="userAgent"></h2>
25
+ <ol id="tests"></ol>
26
+ <div id="main"></div>
27
+ <div id="fixtures">
28
+ <%= @test_case.html_fixtures %>
29
+ </div>
30
+ </body>
31
+ </html>
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hanoi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Luca Guidi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-09 00:00:00 +02:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Automated jQuery tests with QUnit
17
+ email: guidi.luca@gmail.com
18
+ executables:
19
+ - hanoi
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.textile
24
+ files:
25
+ - MIT-LICENSE
26
+ - README.textile
27
+ - Rakefile
28
+ - bin/hanoi
29
+ - hanoi.gemspec
30
+ - lib/hanoi.rb
31
+ - lib/hanoi/browser.rb
32
+ - lib/hanoi/browsers/firefox.rb
33
+ - lib/hanoi/browsers/internet_explorer.rb
34
+ - lib/hanoi/browsers/konqueror.rb
35
+ - lib/hanoi/browsers/opera.rb
36
+ - lib/hanoi/browsers/safari.rb
37
+ - lib/hanoi/javascript_test_task.rb
38
+ - lib/hanoi/test_case.rb
39
+ - lib/hanoi/test_results.rb
40
+ - lib/hanoi/test_suite_results.rb
41
+ - lib/hanoi/webrick.rb
42
+ - spec/browser_spec.rb
43
+ - spec/browsers/firefox_spec.rb
44
+ - spec/browsers/internet_explorer_spec.rb
45
+ - spec/browsers/konqueror_spec.rb
46
+ - spec/browsers/opera_spec.rb
47
+ - spec/browsers/safari_spec.rb
48
+ - spec/spec_helper.rb
49
+ - templates/assets/jquery.js
50
+ - templates/assets/testrunner.js
51
+ - templates/assets/testsuite.css
52
+ - templates/example_fixtures.html
53
+ - templates/example_test.js
54
+ - templates/fresh_rakefile
55
+ - templates/test_case.erb
56
+ has_rdoc: true
57
+ homepage:
58
+ licenses: []
59
+
60
+ post_install_message:
61
+ rdoc_options: []
62
+
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ version:
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: "0"
76
+ version:
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.3.5
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Automated jQuery tests with QUnit
84
+ test_files:
85
+ - spec/browser_spec.rb
86
+ - spec/browsers/firefox_spec.rb
87
+ - spec/browsers/internet_explorer_spec.rb
88
+ - spec/browsers/konqueror_spec.rb
89
+ - spec/browsers/opera_spec.rb
90
+ - spec/browsers/safari_spec.rb