Fingertips-headless-squirrel 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. data/README.rdoc +3 -1
  2. data/VERSION.yml +1 -1
  3. data/lib/headless_squirrel/runner.rb +1 -1
  4. data/lib/headless_squirrel/test_case.rb +50 -19
  5. data/test/regression/scriptaculous/unit/ajax_autocompleter_test.html +4 -4
  6. data/test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html +4 -4
  7. data/test/regression/scriptaculous/{src → unit/assets}/builder.js +0 -0
  8. data/test/regression/scriptaculous/{src → unit/assets}/controls.js +0 -0
  9. data/test/regression/scriptaculous/{src → unit/assets}/dragdrop.js +0 -0
  10. data/test/regression/scriptaculous/{src → unit/assets}/effects.js +0 -0
  11. data/test/regression/scriptaculous/{src → unit/assets}/javascripttest.rb +0 -0
  12. data/test/regression/scriptaculous/unit/assets/prototype.js +4320 -0
  13. data/test/regression/scriptaculous/{src → unit/assets}/scriptaculous.js +0 -0
  14. data/test/regression/scriptaculous/{src → unit/assets}/slider.js +0 -0
  15. data/test/regression/scriptaculous/{src → unit/assets}/sound.js +0 -0
  16. data/test/regression/scriptaculous/{src → unit/assets}/unittest.js +0 -0
  17. data/test/regression/scriptaculous/unit/bdd_test.html +150 -0
  18. data/test/regression/scriptaculous/unit/builder_test.html +4 -4
  19. data/test/regression/scriptaculous/unit/dragdrop_test.html +4 -4
  20. data/test/regression/scriptaculous/unit/effects_test.html +4 -4
  21. data/test/regression/scriptaculous/unit/element_test.html +4 -4
  22. data/test/regression/scriptaculous/unit/index.html +3 -3
  23. data/test/regression/scriptaculous/unit/loading_test.html +4 -4
  24. data/test/regression/scriptaculous/unit/position_clone_test.html +4 -4
  25. data/test/regression/scriptaculous/unit/slider_test.html +4 -4
  26. data/test/regression/scriptaculous/unit/sortable_test.html +4 -4
  27. data/test/regression/scriptaculous/unit/string_test.html +4 -4
  28. data/test/regression/scriptaculous/unit/unittest_test.html +4 -4
  29. metadata +29 -19
  30. data/Rakefile +0 -49
@@ -0,0 +1,150 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>script.aculo.us Unit test file</title>
6
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
+ </head>
12
+ <body>
13
+ <h1>script.aculo.us Unit test file</h1>
14
+
15
+ <!-- Log output -->
16
+ <div id="testlog"> </div>
17
+
18
+ <div id="d">initial</div>
19
+
20
+ <!-- Tests follow -->
21
+ <script type="text/javascript" language="javascript" charset="utf-8">
22
+ // <![CDATA[
23
+ var moo = 0;
24
+
25
+ var assertMethods = [];
26
+ for(method in Test.Unit.Assertions.prototype) {
27
+ if(/^assert/.test(method)) assertMethods.push(method);
28
+ }
29
+
30
+ var testObj = {
31
+ isNice: function(){
32
+ return true;
33
+ },
34
+ isBroken: function(){
35
+ return false;
36
+ }
37
+ }
38
+
39
+ Test.context("BDD-style testing",{
40
+
41
+ setup: function() {
42
+ $('d').update('setup!');
43
+ moo++;
44
+ },
45
+
46
+ teardown: function() {
47
+ moo--;
48
+ },
49
+
50
+ 'should run setup before each specification': function(){
51
+ assert($('d').innerHTML == 'setup!');
52
+ assert(moo == 1);
53
+ },
54
+
55
+ 'should run teardown after each specification': function(){
56
+ assert(moo == 1);
57
+ },
58
+
59
+ 'should provide extensions to tie in isSomething and respondsTo object methods': function(){
60
+ Object.extend(testObj, Test.BDDMethods);
61
+
62
+ testObj.shouldBe('nice');
63
+ testObj.shouldNotBe('broken');
64
+
65
+ testObj.shouldRespondTo('isNice');
66
+ testObj.shouldRespondTo('isBroken');
67
+ },
68
+
69
+ 'should automatically add extensions to strings': function(){
70
+ 'a'.shouldEqual('a');
71
+ 'a'.shouldNotEqual('b');
72
+ 'a'.shouldNotBeNull();
73
+ 'a'.shouldBeA(String);
74
+
75
+ var aString = 'boo!';
76
+ aString.shouldEqual('boo!');
77
+ aString.shouldBeA(String);
78
+ aString.shouldNotBeA(Number);
79
+ },
80
+
81
+ 'should automatically add extensions to numbers': function(){
82
+ var n = 123;
83
+ n.shouldEqual(123);
84
+ n.shouldNotEqual(4);
85
+
86
+ n.shouldBeA(Number);
87
+ n.shouldNotBeA(Test);
88
+ },
89
+
90
+ 'should automatically add extensions to arrays': function(){
91
+ ['a'].shouldNotBeA(String);
92
+ [1,2,3].shouldBeAn(Array);
93
+ [1,2,3].shouldEqualEnum([1,2,3]);
94
+ },
95
+
96
+ 'should automatically add extensions to booleans': function(){
97
+ var theTruth = true;
98
+ var lies = false;
99
+
100
+ theTruth.shouldNotBeA(String);
101
+ lies.shouldBeA(Boolean);
102
+ 'false'.shouldNotBeA(Boolean);
103
+
104
+ theTruth.shouldEqual(true);
105
+ lies.shouldNotEqual(true);
106
+ },
107
+
108
+ 'should support the eval() method': function(){
109
+ eval('2*2').shouldEqual(4);
110
+ },
111
+
112
+ 'should support equality assertion': function(){
113
+ assertEqual(1, 1);
114
+ assertEqual('a', 'a');
115
+ assertEqual(1, '1');
116
+
117
+ var x = 1;
118
+ var y = 1;
119
+ assertEqual(1, x)
120
+ assertEqual(x, y);
121
+ },
122
+
123
+ 'should provide all assertions': function(){
124
+ assertMethods.each(function(m){
125
+ assert(typeof this[m] == 'function');
126
+ }.bind(this));
127
+ },
128
+
129
+ 'should support deferred execution': function(){
130
+ wait(10,function(){
131
+ 'a'.shouldEqual('a');
132
+ });
133
+
134
+ wait(10,function(){
135
+ 'a'.shouldEqual('a');
136
+ wait(10,function(){
137
+ 'a'.shouldEqual('a');
138
+ wait(10,function(){
139
+ 'a'.shouldEqual('a');
140
+ });
141
+ });
142
+ });
143
+ }
144
+
145
+ });
146
+
147
+ // ]]>
148
+ </script>
149
+ </body>
150
+ </html>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  <style type="text/css" media="screen">
12
12
  /* <![CDATA[ */
13
13
  #div_absolute_test { position: absolute }
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  <style type="text/css" media="screen">
12
12
  #rotfl {
13
13
  color: red;
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  <style type="text/css" media="screen">
12
12
  #style_test_1 { color:rgb(0, 0, 255); background-color: rgb(0, 0, 255); }
13
13
  blah { color:rgb(0, 255, 0); }
@@ -4,9 +4,9 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../lib/prototype.js" type="text/javascript"></script>
8
- <script src="../../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../src/unittest.js" type="text/javascript"></script>
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
10
  <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body class="navigation">
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js?load=effects,dragdrop" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  </head>
12
12
  <body>
13
13
  <h1>script.aculo.us Unit test file</h1>
@@ -4,10 +4,10 @@
4
4
  <head>
5
5
  <title>script.aculo.us Unit test file</title>
6
6
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7
- <script src="../../prototype/unit/assets/prototype.js" type="text/javascript"></script>
8
- <script src="../src/scriptaculous.js" type="text/javascript"></script>
9
- <script src="../../prototype/unit/assets/unittest.js" type="text/javascript"></script>
10
- <link rel="stylesheet" href="../../prototype/unit/assets/unittest.css" type="text/css" />
7
+ <script src="assets/prototype.js" type="text/javascript"></script>
8
+ <script src="assets/scriptaculous.js" type="text/javascript"></script>
9
+ <script src="assets/unittest.js" type="text/javascript"></script>
10
+ <link rel="stylesheet" href="../test.css" type="text/css" />
11
11
  <style type="text/css" media="screen">
12
12
  /* <![CDATA[ */
13
13
  #testcss1 { font-size:11px; color: #f00; }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Fingertips-headless-squirrel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-14 00:00:00 -07:00
12
+ date: 2009-06-03 00:00:00 -07:00
13
13
  default_executable: jstest
14
14
  dependencies: []
15
15
 
@@ -23,17 +23,22 @@ extra_rdoc_files:
23
23
  - README.rdoc
24
24
  files:
25
25
  - README.rdoc
26
- - Rakefile
27
26
  - VERSION.yml
28
27
  - bin/jstest
29
- - lib/headless_squirrel.rb
28
+ - lib/headless_squirrel
30
29
  - lib/headless_squirrel/runner.rb
31
30
  - lib/headless_squirrel/test.rb
32
31
  - lib/headless_squirrel/test_case.rb
32
+ - lib/headless_squirrel.rb
33
+ - test/fixtures
33
34
  - test/fixtures/a_unit_test.html
34
35
  - test/fixtures/a_unit_test.js
36
+ - test/regression
37
+ - test/regression/prototype
38
+ - test/regression/prototype/unit
35
39
  - test/regression/prototype/unit/ajax_test.html
36
40
  - test/regression/prototype/unit/array_test.html
41
+ - test/regression/prototype/unit/assets
37
42
  - test/regression/prototype/unit/assets/prototype.js
38
43
  - test/regression/prototype/unit/assets/unittest.css
39
44
  - test/regression/prototype/unit/assets/unittest.js
@@ -45,6 +50,7 @@ files:
45
50
  - test/regression/prototype/unit/element_mixins_test.html
46
51
  - test/regression/prototype/unit/enumerable_test.html
47
52
  - test/regression/prototype/unit/event_test.html
53
+ - test/regression/prototype/unit/fixtures
48
54
  - test/regression/prototype/unit/fixtures/ajax.html
49
55
  - test/regression/prototype/unit/fixtures/ajax.js
50
56
  - test/regression/prototype/unit/fixtures/array.html
@@ -84,6 +90,7 @@ files:
84
90
  - test/regression/prototype/unit/regexp_test.html
85
91
  - test/regression/prototype/unit/selector_test.html
86
92
  - test/regression/prototype/unit/string_test.html
93
+ - test/regression/prototype/unit/tests
87
94
  - test/regression/prototype/unit/tests/ajax_test.js
88
95
  - test/regression/prototype/unit/tests/array_test.js
89
96
  - test/regression/prototype/unit/tests/base_test.js
@@ -108,15 +115,8 @@ files:
108
115
  - test/regression/prototype/unit/tests/unittest_test.js
109
116
  - test/regression/prototype/unit/unittest_test.html
110
117
  - test/regression/prototype/upstream
111
- - test/regression/scriptaculous/src/builder.js
112
- - test/regression/scriptaculous/src/controls.js
113
- - test/regression/scriptaculous/src/dragdrop.js
114
- - test/regression/scriptaculous/src/effects.js
115
- - test/regression/scriptaculous/src/javascripttest.rb
116
- - test/regression/scriptaculous/src/scriptaculous.js
117
- - test/regression/scriptaculous/src/slider.js
118
- - test/regression/scriptaculous/src/sound.js
119
- - test/regression/scriptaculous/src/unittest.js
118
+ - test/regression/scriptaculous
119
+ - test/regression/scriptaculous/unit
120
120
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_alt_text.html
121
121
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_collection.js
122
122
  - test/regression/scriptaculous/unit/_ajax_inplaceeditor_result.html
@@ -128,6 +128,18 @@ files:
128
128
  - test/regression/scriptaculous/unit/_autocomplete_result_nobr.html
129
129
  - test/regression/scriptaculous/unit/ajax_autocompleter_test.html
130
130
  - test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html
131
+ - test/regression/scriptaculous/unit/assets
132
+ - test/regression/scriptaculous/unit/assets/builder.js
133
+ - test/regression/scriptaculous/unit/assets/controls.js
134
+ - test/regression/scriptaculous/unit/assets/dragdrop.js
135
+ - test/regression/scriptaculous/unit/assets/effects.js
136
+ - test/regression/scriptaculous/unit/assets/javascripttest.rb
137
+ - test/regression/scriptaculous/unit/assets/prototype.js
138
+ - test/regression/scriptaculous/unit/assets/scriptaculous.js
139
+ - test/regression/scriptaculous/unit/assets/slider.js
140
+ - test/regression/scriptaculous/unit/assets/sound.js
141
+ - test/regression/scriptaculous/unit/assets/unittest.js
142
+ - test/regression/scriptaculous/unit/bdd_test.html
131
143
  - test/regression/scriptaculous/unit/builder_test.html
132
144
  - test/regression/scriptaculous/unit/dragdrop_test.html
133
145
  - test/regression/scriptaculous/unit/effects_test.html
@@ -142,6 +154,7 @@ files:
142
154
  - test/regression/scriptaculous/unit/unittest_test.html
143
155
  - test/regression/scriptaculous/upstream
144
156
  - test/test_helper.rb
157
+ - test/unit
145
158
  - test/unit/runner_test.rb
146
159
  - test/unit/test_case_test.rb
147
160
  - test/unit/test_test.rb
@@ -149,6 +162,7 @@ has_rdoc: true
149
162
  homepage: http://github.com/Fingertips/headless-squirrel/tree/master
150
163
  post_install_message:
151
164
  rdoc_options:
165
+ - --inline-source
152
166
  - --charset=UTF-8
153
167
  require_paths:
154
168
  - lib
@@ -171,9 +185,5 @@ rubygems_version: 1.2.0
171
185
  signing_key:
172
186
  specification_version: 2
173
187
  summary: A command-line JavaScript test runner for the Mac.
174
- test_files:
175
- - test/regression/scriptaculous/src/javascripttest.rb
176
- - test/test_helper.rb
177
- - test/unit/runner_test.rb
178
- - test/unit/test_case_test.rb
179
- - test/unit/test_test.rb
188
+ test_files: []
189
+