headless-squirrel 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +55 -0
- data/Rakefile +27 -0
- data/bin/jstest +10 -0
- data/lib/headless_squirrel.rb +2 -0
- data/lib/headless_squirrel/console.rb +24 -0
- data/lib/headless_squirrel/runner.rb +70 -0
- data/lib/headless_squirrel/test.rb +17 -0
- data/lib/headless_squirrel/test_case.rb +158 -0
- data/test/fixtures/a_unit_test.html +27 -0
- data/test/fixtures/a_unit_test.js +22 -0
- data/test/fixtures/syntax_error.html +27 -0
- data/test/fixtures/syntax_error.js +5 -0
- data/test/fixtures/type_error.html +27 -0
- data/test/fixtures/type_error.js +1 -0
- data/test/regression/prototype/unit/ajax_test.html +29 -0
- data/test/regression/prototype/unit/array_test.html +28 -0
- data/test/regression/prototype/unit/assets/prototype.js +4900 -0
- data/test/regression/prototype/unit/assets/unittest.css +50 -0
- data/test/regression/prototype/unit/assets/unittest.js +615 -0
- data/test/regression/prototype/unit/assets/unittest_transport.js +1 -0
- data/test/regression/prototype/unit/base_test.html +27 -0
- data/test/regression/prototype/unit/class_test.html +27 -0
- data/test/regression/prototype/unit/date_test.html +27 -0
- data/test/regression/prototype/unit/dom_test.html +304 -0
- data/test/regression/prototype/unit/element_mixins_test.html +30 -0
- data/test/regression/prototype/unit/enumerable_test.html +35 -0
- data/test/regression/prototype/unit/event_test.html +31 -0
- data/test/regression/prototype/unit/fixtures/ajax.html +2 -0
- data/test/regression/prototype/unit/fixtures/ajax.js +42 -0
- data/test/regression/prototype/unit/fixtures/array.html +1 -0
- data/test/regression/prototype/unit/fixtures/class.js +83 -0
- data/test/regression/prototype/unit/fixtures/content.html +1 -0
- data/test/regression/prototype/unit/fixtures/data.json +1 -0
- data/test/regression/prototype/unit/fixtures/dom.css +84 -0
- data/test/regression/prototype/unit/fixtures/dom.html +278 -0
- data/test/regression/prototype/unit/fixtures/dom.js +17 -0
- data/test/regression/prototype/unit/fixtures/element_mixins.html +4 -0
- data/test/regression/prototype/unit/fixtures/element_mixins.js +2 -0
- data/test/regression/prototype/unit/fixtures/empty.html +0 -0
- data/test/regression/prototype/unit/fixtures/empty.js +1 -0
- data/test/regression/prototype/unit/fixtures/enumerable.html +8 -0
- data/test/regression/prototype/unit/fixtures/enumerable.js +23 -0
- data/test/regression/prototype/unit/fixtures/event.html +4 -0
- data/test/regression/prototype/unit/fixtures/form.html +108 -0
- data/test/regression/prototype/unit/fixtures/function.js +13 -0
- data/test/regression/prototype/unit/fixtures/hash.js +25 -0
- data/test/regression/prototype/unit/fixtures/hello.js +1 -0
- data/test/regression/prototype/unit/fixtures/logo.gif +0 -0
- data/test/regression/prototype/unit/fixtures/object.html +6 -0
- data/test/regression/prototype/unit/fixtures/object.js +7 -0
- data/test/regression/prototype/unit/fixtures/position.html +9 -0
- data/test/regression/prototype/unit/fixtures/selector.html +71 -0
- data/test/regression/prototype/unit/fixtures/string.js +8 -0
- data/test/regression/prototype/unit/fixtures/unittest.html +18 -0
- data/test/regression/prototype/unit/form_test.html +135 -0
- data/test/regression/prototype/unit/function_test.html +27 -0
- data/test/regression/prototype/unit/hash_test.html +27 -0
- data/test/regression/prototype/unit/number_test.html +27 -0
- data/test/regression/prototype/unit/object_test.html +32 -0
- data/test/regression/prototype/unit/periodical_executer_test.html +27 -0
- data/test/regression/prototype/unit/position_test.html +36 -0
- data/test/regression/prototype/unit/prototype_test.html +27 -0
- data/test/regression/prototype/unit/range_test.html +27 -0
- data/test/regression/prototype/unit/regexp_test.html +27 -0
- data/test/regression/prototype/unit/selector_test.html +98 -0
- data/test/regression/prototype/unit/string_test.html +27 -0
- data/test/regression/prototype/unit/tests/ajax_test.js +379 -0
- data/test/regression/prototype/unit/tests/array_test.js +186 -0
- data/test/regression/prototype/unit/tests/base_test.js +43 -0
- data/test/regression/prototype/unit/tests/class_test.js +136 -0
- data/test/regression/prototype/unit/tests/date_test.js +5 -0
- data/test/regression/prototype/unit/tests/dom_test.js +1493 -0
- data/test/regression/prototype/unit/tests/element_mixins_test.js +32 -0
- data/test/regression/prototype/unit/tests/enumerable_test.js +271 -0
- data/test/regression/prototype/unit/tests/event_test.js +235 -0
- data/test/regression/prototype/unit/tests/form_test.js +382 -0
- data/test/regression/prototype/unit/tests/function_test.js +133 -0
- data/test/regression/prototype/unit/tests/hash_test.js +178 -0
- data/test/regression/prototype/unit/tests/number_test.js +44 -0
- data/test/regression/prototype/unit/tests/object_test.js +180 -0
- data/test/regression/prototype/unit/tests/periodical_executer_test.js +15 -0
- data/test/regression/prototype/unit/tests/position_test.js +44 -0
- data/test/regression/prototype/unit/tests/prototype_test.js +43 -0
- data/test/regression/prototype/unit/tests/range_test.js +58 -0
- data/test/regression/prototype/unit/tests/regexp_test.js +42 -0
- data/test/regression/prototype/unit/tests/selector_test.js +408 -0
- data/test/regression/prototype/unit/tests/string_test.js +548 -0
- data/test/regression/prototype/unit/tests/unittest_test.js +148 -0
- data/test/regression/prototype/unit/unittest_test.html +45 -0
- data/test/regression/prototype/upstream +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_alt_text.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_collection.js +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_result.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_result2.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_tagged.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_inplaceeditor_text.html +1 -0
- data/test/regression/scriptaculous/unit/_ajax_updater_result.html +20 -0
- data/test/regression/scriptaculous/unit/_autocomplete_result.html +11 -0
- data/test/regression/scriptaculous/unit/_autocomplete_result_nobr.html +1 -0
- data/test/regression/scriptaculous/unit/ajax_autocompleter_test.html +243 -0
- data/test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html +895 -0
- data/test/regression/scriptaculous/unit/assets/builder.js +134 -0
- data/test/regression/scriptaculous/unit/assets/controls.js +963 -0
- data/test/regression/scriptaculous/unit/assets/dragdrop.js +973 -0
- data/test/regression/scriptaculous/unit/assets/effects.js +1122 -0
- data/test/regression/scriptaculous/unit/assets/javascripttest.rb +203 -0
- data/test/regression/scriptaculous/unit/assets/prototype.js +4320 -0
- data/test/regression/scriptaculous/unit/assets/scriptaculous.js +66 -0
- data/test/regression/scriptaculous/unit/assets/slider.js +273 -0
- data/test/regression/scriptaculous/unit/assets/sound.js +57 -0
- data/test/regression/scriptaculous/unit/assets/unittest.js +566 -0
- data/test/regression/scriptaculous/unit/bdd_test.html +150 -0
- data/test/regression/scriptaculous/unit/builder_test.html +262 -0
- data/test/regression/scriptaculous/unit/dragdrop_test.html +131 -0
- data/test/regression/scriptaculous/unit/effects_test.html +547 -0
- data/test/regression/scriptaculous/unit/element_test.html +116 -0
- data/test/regression/scriptaculous/unit/icon.png +0 -0
- data/test/regression/scriptaculous/unit/index.html +70 -0
- data/test/regression/scriptaculous/unit/loading_test.html +41 -0
- data/test/regression/scriptaculous/unit/position_clone_test.html +312 -0
- data/test/regression/scriptaculous/unit/slider_test.html +437 -0
- data/test/regression/scriptaculous/unit/sortable_test.html +205 -0
- data/test/regression/scriptaculous/unit/string_test.html +71 -0
- data/test/regression/scriptaculous/unit/unittest_test.html +154 -0
- data/test/regression/scriptaculous/upstream +1 -0
- data/test/test_helper.rb +20 -0
- data/test/unit/runner_test.rb +165 -0
- data/test/unit/test_case_test.rb +207 -0
- data/test/unit/test_test.rb +24 -0
- metadata +209 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
describe "HeadlessSquirrel::TestCase::Test" do
|
4
|
+
before do
|
5
|
+
@delegate = stub_everything('delegate')
|
6
|
+
@test_case = HeadlessSquirrel::TestCase.alloc.initWithHTMLFile_delegate(fixture('a_unit_test.html'), @delegate)
|
7
|
+
@test_case.instance_variable_set(:@title, 'A test case')
|
8
|
+
|
9
|
+
@test = HeadlessSquirrel::TestCase::Test.new(@test_case, 'testHelloWorld', :failed, 'did not meet expectation')
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should initialize with a TestCase, name, state and output" do
|
13
|
+
@test.test_case.should == @test_case
|
14
|
+
@test.name.should == 'testHelloWorld'
|
15
|
+
@test.state.should == :failed
|
16
|
+
@test.output.should == 'did not meet expectation'
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return a formatted string" do
|
20
|
+
@test.to_s.should == %{Failed:
|
21
|
+
testHelloWorld (A test case) [#{fixture('a_unit_test.html')}]:
|
22
|
+
did not meet expectation}
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: headless-squirrel
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Eloy Duran
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.0.0
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.0
|
46
|
+
description: A OS X command line tool to run JavaScript (Prototype) unit tests from
|
47
|
+
the comfort of your terminal.
|
48
|
+
email: eloy.de.enige@gmail.com
|
49
|
+
executables:
|
50
|
+
- jstest
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files:
|
53
|
+
- README.rdoc
|
54
|
+
files:
|
55
|
+
- Rakefile
|
56
|
+
- bin/jstest
|
57
|
+
- lib/headless_squirrel/console.rb
|
58
|
+
- lib/headless_squirrel/runner.rb
|
59
|
+
- lib/headless_squirrel/test.rb
|
60
|
+
- lib/headless_squirrel/test_case.rb
|
61
|
+
- lib/headless_squirrel.rb
|
62
|
+
- test/fixtures/a_unit_test.html
|
63
|
+
- test/fixtures/a_unit_test.js
|
64
|
+
- test/fixtures/syntax_error.html
|
65
|
+
- test/fixtures/syntax_error.js
|
66
|
+
- test/fixtures/type_error.html
|
67
|
+
- test/fixtures/type_error.js
|
68
|
+
- test/regression/prototype/unit/ajax_test.html
|
69
|
+
- test/regression/prototype/unit/array_test.html
|
70
|
+
- test/regression/prototype/unit/assets/prototype.js
|
71
|
+
- test/regression/prototype/unit/assets/unittest.css
|
72
|
+
- test/regression/prototype/unit/assets/unittest.js
|
73
|
+
- test/regression/prototype/unit/assets/unittest_transport.js
|
74
|
+
- test/regression/prototype/unit/base_test.html
|
75
|
+
- test/regression/prototype/unit/class_test.html
|
76
|
+
- test/regression/prototype/unit/date_test.html
|
77
|
+
- test/regression/prototype/unit/dom_test.html
|
78
|
+
- test/regression/prototype/unit/element_mixins_test.html
|
79
|
+
- test/regression/prototype/unit/enumerable_test.html
|
80
|
+
- test/regression/prototype/unit/event_test.html
|
81
|
+
- test/regression/prototype/unit/fixtures/ajax.html
|
82
|
+
- test/regression/prototype/unit/fixtures/ajax.js
|
83
|
+
- test/regression/prototype/unit/fixtures/array.html
|
84
|
+
- test/regression/prototype/unit/fixtures/class.js
|
85
|
+
- test/regression/prototype/unit/fixtures/content.html
|
86
|
+
- test/regression/prototype/unit/fixtures/data.json
|
87
|
+
- test/regression/prototype/unit/fixtures/dom.css
|
88
|
+
- test/regression/prototype/unit/fixtures/dom.html
|
89
|
+
- test/regression/prototype/unit/fixtures/dom.js
|
90
|
+
- test/regression/prototype/unit/fixtures/element_mixins.html
|
91
|
+
- test/regression/prototype/unit/fixtures/element_mixins.js
|
92
|
+
- test/regression/prototype/unit/fixtures/empty.html
|
93
|
+
- test/regression/prototype/unit/fixtures/empty.js
|
94
|
+
- test/regression/prototype/unit/fixtures/enumerable.html
|
95
|
+
- test/regression/prototype/unit/fixtures/enumerable.js
|
96
|
+
- test/regression/prototype/unit/fixtures/event.html
|
97
|
+
- test/regression/prototype/unit/fixtures/form.html
|
98
|
+
- test/regression/prototype/unit/fixtures/function.js
|
99
|
+
- test/regression/prototype/unit/fixtures/hash.js
|
100
|
+
- test/regression/prototype/unit/fixtures/hello.js
|
101
|
+
- test/regression/prototype/unit/fixtures/logo.gif
|
102
|
+
- test/regression/prototype/unit/fixtures/object.html
|
103
|
+
- test/regression/prototype/unit/fixtures/object.js
|
104
|
+
- test/regression/prototype/unit/fixtures/position.html
|
105
|
+
- test/regression/prototype/unit/fixtures/selector.html
|
106
|
+
- test/regression/prototype/unit/fixtures/string.js
|
107
|
+
- test/regression/prototype/unit/fixtures/unittest.html
|
108
|
+
- test/regression/prototype/unit/form_test.html
|
109
|
+
- test/regression/prototype/unit/function_test.html
|
110
|
+
- test/regression/prototype/unit/hash_test.html
|
111
|
+
- test/regression/prototype/unit/number_test.html
|
112
|
+
- test/regression/prototype/unit/object_test.html
|
113
|
+
- test/regression/prototype/unit/periodical_executer_test.html
|
114
|
+
- test/regression/prototype/unit/position_test.html
|
115
|
+
- test/regression/prototype/unit/prototype_test.html
|
116
|
+
- test/regression/prototype/unit/range_test.html
|
117
|
+
- test/regression/prototype/unit/regexp_test.html
|
118
|
+
- test/regression/prototype/unit/selector_test.html
|
119
|
+
- test/regression/prototype/unit/string_test.html
|
120
|
+
- test/regression/prototype/unit/tests/ajax_test.js
|
121
|
+
- test/regression/prototype/unit/tests/array_test.js
|
122
|
+
- test/regression/prototype/unit/tests/base_test.js
|
123
|
+
- test/regression/prototype/unit/tests/class_test.js
|
124
|
+
- test/regression/prototype/unit/tests/date_test.js
|
125
|
+
- test/regression/prototype/unit/tests/dom_test.js
|
126
|
+
- test/regression/prototype/unit/tests/element_mixins_test.js
|
127
|
+
- test/regression/prototype/unit/tests/enumerable_test.js
|
128
|
+
- test/regression/prototype/unit/tests/event_test.js
|
129
|
+
- test/regression/prototype/unit/tests/form_test.js
|
130
|
+
- test/regression/prototype/unit/tests/function_test.js
|
131
|
+
- test/regression/prototype/unit/tests/hash_test.js
|
132
|
+
- test/regression/prototype/unit/tests/number_test.js
|
133
|
+
- test/regression/prototype/unit/tests/object_test.js
|
134
|
+
- test/regression/prototype/unit/tests/periodical_executer_test.js
|
135
|
+
- test/regression/prototype/unit/tests/position_test.js
|
136
|
+
- test/regression/prototype/unit/tests/prototype_test.js
|
137
|
+
- test/regression/prototype/unit/tests/range_test.js
|
138
|
+
- test/regression/prototype/unit/tests/regexp_test.js
|
139
|
+
- test/regression/prototype/unit/tests/selector_test.js
|
140
|
+
- test/regression/prototype/unit/tests/string_test.js
|
141
|
+
- test/regression/prototype/unit/tests/unittest_test.js
|
142
|
+
- test/regression/prototype/unit/unittest_test.html
|
143
|
+
- test/regression/prototype/upstream
|
144
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_alt_text.html
|
145
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_ipce_collection.js
|
146
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_result.html
|
147
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_result2.html
|
148
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_tagged.html
|
149
|
+
- test/regression/scriptaculous/unit/_ajax_inplaceeditor_text.html
|
150
|
+
- test/regression/scriptaculous/unit/_ajax_updater_result.html
|
151
|
+
- test/regression/scriptaculous/unit/_autocomplete_result.html
|
152
|
+
- test/regression/scriptaculous/unit/_autocomplete_result_nobr.html
|
153
|
+
- test/regression/scriptaculous/unit/ajax_autocompleter_test.html
|
154
|
+
- test/regression/scriptaculous/unit/ajax_inplaceeditor_test.html
|
155
|
+
- test/regression/scriptaculous/unit/assets/builder.js
|
156
|
+
- test/regression/scriptaculous/unit/assets/controls.js
|
157
|
+
- test/regression/scriptaculous/unit/assets/dragdrop.js
|
158
|
+
- test/regression/scriptaculous/unit/assets/effects.js
|
159
|
+
- test/regression/scriptaculous/unit/assets/javascripttest.rb
|
160
|
+
- test/regression/scriptaculous/unit/assets/prototype.js
|
161
|
+
- test/regression/scriptaculous/unit/assets/scriptaculous.js
|
162
|
+
- test/regression/scriptaculous/unit/assets/slider.js
|
163
|
+
- test/regression/scriptaculous/unit/assets/sound.js
|
164
|
+
- test/regression/scriptaculous/unit/assets/unittest.js
|
165
|
+
- test/regression/scriptaculous/unit/bdd_test.html
|
166
|
+
- test/regression/scriptaculous/unit/builder_test.html
|
167
|
+
- test/regression/scriptaculous/unit/dragdrop_test.html
|
168
|
+
- test/regression/scriptaculous/unit/effects_test.html
|
169
|
+
- test/regression/scriptaculous/unit/element_test.html
|
170
|
+
- test/regression/scriptaculous/unit/icon.png
|
171
|
+
- test/regression/scriptaculous/unit/index.html
|
172
|
+
- test/regression/scriptaculous/unit/loading_test.html
|
173
|
+
- test/regression/scriptaculous/unit/position_clone_test.html
|
174
|
+
- test/regression/scriptaculous/unit/slider_test.html
|
175
|
+
- test/regression/scriptaculous/unit/sortable_test.html
|
176
|
+
- test/regression/scriptaculous/unit/string_test.html
|
177
|
+
- test/regression/scriptaculous/unit/unittest_test.html
|
178
|
+
- test/regression/scriptaculous/upstream
|
179
|
+
- test/test_helper.rb
|
180
|
+
- test/unit/runner_test.rb
|
181
|
+
- test/unit/test_case_test.rb
|
182
|
+
- test/unit/test_test.rb
|
183
|
+
- README.rdoc
|
184
|
+
homepage: http://github.com/Fingertips/headless-squirrel/tree/master
|
185
|
+
licenses: []
|
186
|
+
post_install_message:
|
187
|
+
rdoc_options:
|
188
|
+
- --charset=UTF-8
|
189
|
+
require_paths:
|
190
|
+
- lib
|
191
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
192
|
+
none: false
|
193
|
+
requirements:
|
194
|
+
- - ! '>='
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
199
|
+
requirements:
|
200
|
+
- - ! '>='
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
requirements: []
|
204
|
+
rubyforge_project:
|
205
|
+
rubygems_version: 1.8.21
|
206
|
+
signing_key:
|
207
|
+
specification_version: 3
|
208
|
+
summary: A command-line JavaScript test runner for the Mac.
|
209
|
+
test_files: []
|