teaspoon 0.7.9 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +382 -260
- data/app/assets/javascripts/teaspoon-angular.js +108 -26241
- data/app/assets/javascripts/teaspoon-jasmine.js +103 -2642
- data/app/assets/javascripts/teaspoon-mocha.js +109 -5416
- data/app/assets/javascripts/teaspoon-qunit.js +107 -2255
- data/app/assets/javascripts/teaspoon-teaspoon.js +0 -1
- data/app/assets/javascripts/teaspoon/angular.coffee +3 -1
- data/app/assets/javascripts/teaspoon/base/hook.coffee +21 -0
- data/app/assets/javascripts/teaspoon/base/reporters/html.coffee +26 -14
- data/app/assets/javascripts/teaspoon/base/reporters/html/progress_view.coffee +1 -1
- data/app/assets/javascripts/teaspoon/base/reporters/html/template.coffee +3 -3
- data/app/assets/javascripts/teaspoon/base/teaspoon.coffee +10 -1
- data/app/assets/javascripts/teaspoon/jasmine.coffee +3 -1
- data/app/assets/javascripts/teaspoon/mocha.coffee +3 -1
- data/app/assets/javascripts/teaspoon/mocha/reporters/html.coffee +1 -1
- data/app/assets/javascripts/teaspoon/qunit.coffee +3 -1
- data/app/assets/javascripts/teaspoon/qunit/reporters/html.coffee +1 -1
- data/app/assets/javascripts/teaspoon/teaspoon.coffee +0 -1
- data/app/assets/stylesheets/teaspoon.css +12 -8
- data/app/controllers/teaspoon/suite_controller.rb +32 -0
- data/app/views/teaspoon/suite/_body.html.erb +0 -0
- data/app/views/teaspoon/suite/_boot.html.erb +4 -0
- data/app/views/teaspoon/suite/_boot_require_js.html.erb +19 -0
- data/app/views/teaspoon/{spec/suites.html.erb → suite/index.html.erb} +6 -7
- data/app/views/teaspoon/suite/show.html.erb +19 -0
- data/bin/teaspoon +1 -1
- data/config/routes.rb +14 -4
- data/lib/generators/teaspoon/install/POST_INSTALL +2 -2
- data/lib/generators/teaspoon/install/install_generator.rb +22 -11
- data/lib/generators/teaspoon/install/templates/_body.html.erb +0 -0
- data/lib/generators/teaspoon/install/templates/_boot.html.erb +4 -0
- data/lib/generators/teaspoon/install/templates/jasmine/env.rb +11 -0
- data/lib/generators/teaspoon/install/templates/jasmine/env_comments.rb +182 -0
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.coffee +8 -6
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.js +8 -7
- data/lib/generators/teaspoon/install/templates/mocha/env.rb +11 -0
- data/lib/generators/teaspoon/install/templates/mocha/env_comments.rb +182 -0
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.coffee +13 -13
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.js +13 -13
- data/lib/generators/teaspoon/install/templates/qunit/env.rb +11 -0
- data/lib/generators/teaspoon/install/templates/qunit/env_comments.rb +182 -0
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.coffee +6 -5
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.js +6 -5
- data/lib/tasks/teaspoon.rake +9 -2
- data/lib/teaspoon.rb +4 -6
- data/lib/teaspoon/command_line.rb +116 -134
- data/lib/teaspoon/configuration.rb +144 -66
- data/lib/teaspoon/console.rb +70 -37
- data/lib/teaspoon/coverage.rb +42 -15
- data/lib/teaspoon/deprecated.rb +65 -0
- data/lib/teaspoon/drivers/base.rb +10 -0
- data/lib/teaspoon/drivers/phantomjs/runner.js +9 -11
- data/lib/teaspoon/drivers/phantomjs_driver.rb +21 -21
- data/lib/teaspoon/drivers/selenium_driver.rb +32 -13
- data/lib/teaspoon/engine.rb +32 -12
- data/lib/teaspoon/environment.rb +16 -12
- data/lib/teaspoon/exceptions.rb +41 -5
- data/lib/teaspoon/exporter.rb +52 -0
- data/lib/teaspoon/formatters/base.rb +171 -0
- data/lib/teaspoon/formatters/clean_formatter.rb +2 -4
- data/lib/teaspoon/formatters/documentation_formatter.rb +60 -0
- data/lib/teaspoon/formatters/dot_formatter.rb +12 -90
- data/lib/teaspoon/formatters/json_formatter.rb +36 -0
- data/lib/teaspoon/formatters/junit_formatter.rb +51 -32
- data/lib/teaspoon/formatters/modules/report_module.rb +76 -0
- data/lib/teaspoon/formatters/pride_formatter.rb +23 -27
- data/lib/teaspoon/formatters/snowday_formatter.rb +7 -11
- data/lib/teaspoon/formatters/swayze_or_oprah_formatter.rb +88 -64
- data/lib/teaspoon/formatters/tap_formatter.rb +18 -27
- data/lib/teaspoon/formatters/tap_y_formatter.rb +35 -45
- data/lib/teaspoon/formatters/teamcity_formatter.rb +69 -31
- data/lib/teaspoon/instrumentation.rb +33 -33
- data/lib/teaspoon/result.rb +2 -1
- data/lib/teaspoon/runner.rb +40 -28
- data/lib/teaspoon/server.rb +23 -25
- data/lib/teaspoon/suite.rb +52 -72
- data/lib/teaspoon/utility.rb +3 -14
- data/lib/teaspoon/version.rb +1 -1
- data/spec/dummy/app/assets/javascripts/integration/integration_spec.coffee +3 -0
- data/spec/dummy/app/assets/javascripts/integration/spec_helper.coffee +2 -0
- data/spec/dummy/config/application.rb +3 -0
- data/spec/features/console_reporter_spec.rb +48 -18
- data/spec/features/hooks_spec.rb +23 -41
- data/spec/features/html_reporter_spec.rb +38 -21
- data/spec/features/install_generator_spec.rb +34 -20
- data/spec/features/instrumentation_spec.rb +3 -2
- data/spec/fixtures/coverage.json +243 -0
- data/spec/javascripts/fixtures/_body.html.erb +1 -0
- data/spec/javascripts/jasmine_helper.coffee +1 -1
- data/spec/javascripts/teaspoon/base/fixture_spec.coffee +4 -4
- data/spec/javascripts/teaspoon/base/reporters/html_spec.coffee +9 -10
- data/spec/javascripts/teaspoon/mocha/reporters/html_mspec.coffee +0 -6
- data/spec/javascripts/teaspoon/phantomjs/runner_spec.coffee +5 -6
- data/spec/javascripts/turbolinks_helper.coffee +1 -1
- data/spec/spec_helper.rb +3 -4
- data/spec/teaspoon/command_line_spec.rb +139 -23
- data/spec/teaspoon/configuration_spec.rb +164 -46
- data/spec/teaspoon/console_spec.rb +142 -47
- data/spec/teaspoon/coverage_spec.rb +98 -28
- data/spec/teaspoon/drivers/base_spec.rb +5 -0
- data/spec/teaspoon/drivers/phantomjs_driver_spec.rb +32 -14
- data/spec/teaspoon/drivers/selenium_driver_spec.rb +32 -24
- data/spec/teaspoon/engine_spec.rb +8 -5
- data/spec/teaspoon/environment_spec.rb +56 -33
- data/spec/teaspoon/exceptions_spec.rb +57 -0
- data/spec/teaspoon/exporter_spec.rb +96 -0
- data/spec/teaspoon/formatters/base_spec.rb +259 -0
- data/spec/teaspoon/formatters/clean_formatter_spec.rb +37 -0
- data/spec/teaspoon/formatters/documentation_formatter_spec.rb +127 -0
- data/spec/teaspoon/formatters/dot_formatter_spec.rb +52 -56
- data/spec/teaspoon/formatters/json_formatter_spec.rb +77 -0
- data/spec/teaspoon/formatters/junit_formatter_spec.rb +72 -35
- data/spec/teaspoon/formatters/pride_formatter_spec.rb +37 -0
- data/spec/teaspoon/formatters/snowday_formatter_spec.rb +35 -0
- data/spec/teaspoon/formatters/tap_formatter_spec.rb +29 -81
- data/spec/teaspoon/formatters/tap_y_formatter_spec.rb +31 -141
- data/spec/teaspoon/formatters/teamcity_formatter_spec.rb +99 -42
- data/spec/teaspoon/instrumentation_spec.rb +44 -44
- data/spec/teaspoon/result_spec.rb +37 -0
- data/spec/teaspoon/runner_spec.rb +70 -59
- data/spec/teaspoon/server_spec.rb +34 -52
- data/spec/teaspoon/suite_spec.rb +42 -188
- data/spec/teaspoon_env.rb +39 -28
- data/vendor/assets/javascripts/{angular-scenario-1.0.5.js → angular/1.0.5.js} +0 -0
- data/vendor/assets/javascripts/{angular-scenario-1.0.5.MIT-LICENSE → angular/MIT-LICENSE} +0 -0
- data/vendor/assets/javascripts/{jasmine-1.3.1.js → jasmine/1.3.1.js} +0 -0
- data/vendor/assets/javascripts/jasmine/2.0.0.js +2412 -0
- data/vendor/assets/javascripts/{jasmine-1.3.1.MIT.LICENSE → jasmine/MIT.LICENSE} +0 -0
- data/vendor/assets/javascripts/{mocha-1.10.0.js → mocha/1.10.0.js} +1 -0
- data/vendor/assets/javascripts/mocha/1.17.1.js +5813 -0
- data/vendor/assets/javascripts/{mocha-1.10.1.MIT.LICENSE → mocha/MIT.LICENSE} +0 -0
- data/vendor/assets/javascripts/{qunit-1.12.0.js → qunit/1.12.0.js} +1 -1
- data/vendor/assets/javascripts/qunit/1.14.0.js +2288 -0
- data/vendor/assets/javascripts/{qunit-1.12.0.MIT.LICENSE → qunit/MIT.LICENSE} +0 -0
- data/vendor/assets/javascripts/support/chai.js +827 -385
- data/vendor/assets/javascripts/support/jasmine-jquery-1.7.0.js +720 -0
- data/vendor/assets/javascripts/support/jasmine-jquery-2.0.0.js +812 -0
- data/vendor/assets/javascripts/support/sinon-chai.js +17 -0
- data/vendor/assets/javascripts/support/sinon.js +1138 -643
- metadata +57 -36
- data/app/controllers/teaspoon/spec_controller.rb +0 -38
- data/app/helpers/teaspoon/spec_helper.rb +0 -36
- data/app/views/teaspoon/spec/_require_js.html.erb +0 -21
- data/app/views/teaspoon/spec/_standard.html.erb +0 -4
- data/app/views/teaspoon/spec/runner.html.erb +0 -19
- data/lib/generators/teaspoon/install/templates/env.rb +0 -38
- data/lib/generators/teaspoon/install/templates/jasmine/initializer.rb +0 -64
- data/lib/generators/teaspoon/install/templates/mocha/initializer.rb +0 -64
- data/lib/generators/teaspoon/install/templates/qunit/initializer.rb +0 -64
- data/lib/teaspoon/check_coverage.rb +0 -33
- data/lib/teaspoon/drivers/base_driver.rb +0 -10
- data/lib/teaspoon/exception_handling.rb +0 -18
- data/lib/teaspoon/formatters/base_formatter.rb +0 -63
- data/spec/dummy/config/initializers/teaspoon.rb +0 -41
- data/spec/teaspoon/check_coverage_spec.rb +0 -50
- data/spec/teaspoon/formatters/base_formatter_spec.rb +0 -45
- data/vendor/assets/javascripts/support/chai.MIT.LICENSE +0 -22
- data/vendor/assets/javascripts/support/expect.MIT.LICENSE +0 -22
- data/vendor/assets/javascripts/support/jasmine-jquery.MIT.LICENSE +0 -20
- data/vendor/assets/javascripts/support/jasmine-jquery.js +0 -659
- data/vendor/assets/javascripts/support/sinon-chai.MIT-ISH.LICENSE +0 -13
- data/vendor/assets/javascripts/support/sinon.BSD.LICENSE +0 -27
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teaspoon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jejacks0n
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- app/assets/javascripts/teaspoon/angular/reporters/html.coffee
|
46
46
|
- app/assets/javascripts/teaspoon/angular.coffee
|
47
47
|
- app/assets/javascripts/teaspoon/base/fixture.coffee
|
48
|
+
- app/assets/javascripts/teaspoon/base/hook.coffee
|
48
49
|
- app/assets/javascripts/teaspoon/base/reporters/console.coffee
|
49
50
|
- app/assets/javascripts/teaspoon/base/reporters/html/base_view.coffee
|
50
51
|
- app/assets/javascripts/teaspoon/base/reporters/html/failure_view.coffee
|
@@ -70,43 +71,50 @@ files:
|
|
70
71
|
- app/assets/javascripts/teaspoon-qunit.js
|
71
72
|
- app/assets/javascripts/teaspoon-teaspoon.js
|
72
73
|
- app/assets/stylesheets/teaspoon.css
|
73
|
-
- app/controllers/teaspoon/
|
74
|
-
- app/
|
75
|
-
- app/views/teaspoon/
|
76
|
-
- app/views/teaspoon/
|
77
|
-
- app/views/teaspoon/
|
78
|
-
- app/views/teaspoon/
|
74
|
+
- app/controllers/teaspoon/suite_controller.rb
|
75
|
+
- app/views/teaspoon/suite/_body.html.erb
|
76
|
+
- app/views/teaspoon/suite/_boot.html.erb
|
77
|
+
- app/views/teaspoon/suite/_boot_require_js.html.erb
|
78
|
+
- app/views/teaspoon/suite/index.html.erb
|
79
|
+
- app/views/teaspoon/suite/show.html.erb
|
79
80
|
- config/routes.rb
|
80
81
|
- lib/generators/teaspoon/install/install_generator.rb
|
81
82
|
- lib/generators/teaspoon/install/POST_INSTALL
|
82
|
-
- lib/generators/teaspoon/install/templates/
|
83
|
-
- lib/generators/teaspoon/install/templates/
|
83
|
+
- lib/generators/teaspoon/install/templates/_body.html.erb
|
84
|
+
- lib/generators/teaspoon/install/templates/_boot.html.erb
|
85
|
+
- lib/generators/teaspoon/install/templates/jasmine/env.rb
|
86
|
+
- lib/generators/teaspoon/install/templates/jasmine/env_comments.rb
|
84
87
|
- lib/generators/teaspoon/install/templates/jasmine/spec_helper.coffee
|
85
88
|
- lib/generators/teaspoon/install/templates/jasmine/spec_helper.js
|
86
|
-
- lib/generators/teaspoon/install/templates/mocha/
|
89
|
+
- lib/generators/teaspoon/install/templates/mocha/env.rb
|
90
|
+
- lib/generators/teaspoon/install/templates/mocha/env_comments.rb
|
87
91
|
- lib/generators/teaspoon/install/templates/mocha/spec_helper.coffee
|
88
92
|
- lib/generators/teaspoon/install/templates/mocha/spec_helper.js
|
89
|
-
- lib/generators/teaspoon/install/templates/qunit/
|
93
|
+
- lib/generators/teaspoon/install/templates/qunit/env.rb
|
94
|
+
- lib/generators/teaspoon/install/templates/qunit/env_comments.rb
|
90
95
|
- lib/generators/teaspoon/install/templates/qunit/test_helper.coffee
|
91
96
|
- lib/generators/teaspoon/install/templates/qunit/test_helper.js
|
92
97
|
- lib/tasks/teaspoon.rake
|
93
|
-
- lib/teaspoon/check_coverage.rb
|
94
98
|
- lib/teaspoon/command_line.rb
|
95
99
|
- lib/teaspoon/configuration.rb
|
96
100
|
- lib/teaspoon/console.rb
|
97
101
|
- lib/teaspoon/coverage.rb
|
98
|
-
- lib/teaspoon/
|
102
|
+
- lib/teaspoon/deprecated.rb
|
103
|
+
- lib/teaspoon/drivers/base.rb
|
99
104
|
- lib/teaspoon/drivers/phantomjs/runner.js
|
100
105
|
- lib/teaspoon/drivers/phantomjs_driver.rb
|
101
106
|
- lib/teaspoon/drivers/selenium_driver.rb
|
102
107
|
- lib/teaspoon/engine.rb
|
103
108
|
- lib/teaspoon/environment.rb
|
104
|
-
- lib/teaspoon/exception_handling.rb
|
105
109
|
- lib/teaspoon/exceptions.rb
|
106
|
-
- lib/teaspoon/
|
110
|
+
- lib/teaspoon/exporter.rb
|
111
|
+
- lib/teaspoon/formatters/base.rb
|
107
112
|
- lib/teaspoon/formatters/clean_formatter.rb
|
113
|
+
- lib/teaspoon/formatters/documentation_formatter.rb
|
108
114
|
- lib/teaspoon/formatters/dot_formatter.rb
|
115
|
+
- lib/teaspoon/formatters/json_formatter.rb
|
109
116
|
- lib/teaspoon/formatters/junit_formatter.rb
|
117
|
+
- lib/teaspoon/formatters/modules/report_module.rb
|
110
118
|
- lib/teaspoon/formatters/pride_formatter.rb
|
111
119
|
- lib/teaspoon/formatters/snowday_formatter.rb
|
112
120
|
- lib/teaspoon/formatters/swayze_or_oprah_formatter.rb
|
@@ -121,24 +129,23 @@ files:
|
|
121
129
|
- lib/teaspoon/utility.rb
|
122
130
|
- lib/teaspoon/version.rb
|
123
131
|
- lib/teaspoon.rb
|
124
|
-
- vendor/assets/javascripts/angular
|
125
|
-
- vendor/assets/javascripts/angular
|
126
|
-
- vendor/assets/javascripts/jasmine
|
127
|
-
- vendor/assets/javascripts/jasmine
|
128
|
-
- vendor/assets/javascripts/
|
129
|
-
- vendor/assets/javascripts/mocha
|
130
|
-
- vendor/assets/javascripts/
|
131
|
-
- vendor/assets/javascripts/
|
132
|
+
- vendor/assets/javascripts/angular/1.0.5.js
|
133
|
+
- vendor/assets/javascripts/angular/MIT-LICENSE
|
134
|
+
- vendor/assets/javascripts/jasmine/1.3.1.js
|
135
|
+
- vendor/assets/javascripts/jasmine/2.0.0.js
|
136
|
+
- vendor/assets/javascripts/jasmine/MIT.LICENSE
|
137
|
+
- vendor/assets/javascripts/mocha/1.10.0.js
|
138
|
+
- vendor/assets/javascripts/mocha/1.17.1.js
|
139
|
+
- vendor/assets/javascripts/mocha/MIT.LICENSE
|
140
|
+
- vendor/assets/javascripts/qunit/1.12.0.js
|
141
|
+
- vendor/assets/javascripts/qunit/1.14.0.js
|
142
|
+
- vendor/assets/javascripts/qunit/MIT.LICENSE
|
132
143
|
- vendor/assets/javascripts/support/bind-poly.js
|
133
144
|
- vendor/assets/javascripts/support/chai.js
|
134
|
-
- vendor/assets/javascripts/support/chai.MIT.LICENSE
|
135
145
|
- vendor/assets/javascripts/support/expect.js
|
136
|
-
- vendor/assets/javascripts/support/
|
137
|
-
- vendor/assets/javascripts/support/jasmine-jquery.js
|
138
|
-
- vendor/assets/javascripts/support/jasmine-jquery.MIT.LICENSE
|
146
|
+
- vendor/assets/javascripts/support/jasmine-jquery-1.7.0.js
|
147
|
+
- vendor/assets/javascripts/support/jasmine-jquery-2.0.0.js
|
139
148
|
- vendor/assets/javascripts/support/sinon-chai.js
|
140
|
-
- vendor/assets/javascripts/support/sinon-chai.MIT-ISH.LICENSE
|
141
|
-
- vendor/assets/javascripts/support/sinon.BSD.LICENSE
|
142
149
|
- vendor/assets/javascripts/support/sinon.js
|
143
150
|
- bin/teaspoon
|
144
151
|
- MIT.LICENSE
|
@@ -156,7 +163,6 @@ files:
|
|
156
163
|
- spec/dummy/config/environment.rb
|
157
164
|
- spec/dummy/config/environments/development.rb
|
158
165
|
- spec/dummy/config/environments/test.rb
|
159
|
-
- spec/dummy/config/initializers/teaspoon.rb
|
160
166
|
- spec/dummy/config/routes.rb
|
161
167
|
- spec/dummy/log/.gitkeep
|
162
168
|
- spec/dummy/public/favicon.ico
|
@@ -166,7 +172,9 @@ files:
|
|
166
172
|
- spec/features/html_reporter_spec.rb
|
167
173
|
- spec/features/install_generator_spec.rb
|
168
174
|
- spec/features/instrumentation_spec.rb
|
175
|
+
- spec/fixtures/coverage.json
|
169
176
|
- spec/javascripts/angular_helper.coffee
|
177
|
+
- spec/javascripts/fixtures/_body.html.erb
|
170
178
|
- spec/javascripts/fixtures/fixture.html.haml
|
171
179
|
- spec/javascripts/fixtures/fixture.json
|
172
180
|
- spec/javascripts/jasmine_helper.coffee
|
@@ -203,19 +211,25 @@ files:
|
|
203
211
|
- spec/javascripts/turbolinks_helper.coffee
|
204
212
|
- spec/spec_helper.rb
|
205
213
|
- spec/support/aruba.rb
|
206
|
-
- spec/teaspoon/check_coverage_spec.rb
|
207
214
|
- spec/teaspoon/command_line_spec.rb
|
208
215
|
- spec/teaspoon/configuration_spec.rb
|
209
216
|
- spec/teaspoon/console_spec.rb
|
210
217
|
- spec/teaspoon/coverage_spec.rb
|
218
|
+
- spec/teaspoon/drivers/base_spec.rb
|
211
219
|
- spec/teaspoon/drivers/phantomjs_driver_spec.rb
|
212
220
|
- spec/teaspoon/drivers/selenium_driver_spec.rb
|
213
221
|
- spec/teaspoon/engine_spec.rb
|
214
222
|
- spec/teaspoon/environment_spec.rb
|
215
|
-
- spec/teaspoon/
|
223
|
+
- spec/teaspoon/exceptions_spec.rb
|
224
|
+
- spec/teaspoon/exporter_spec.rb
|
225
|
+
- spec/teaspoon/formatters/base_spec.rb
|
226
|
+
- spec/teaspoon/formatters/clean_formatter_spec.rb
|
227
|
+
- spec/teaspoon/formatters/documentation_formatter_spec.rb
|
216
228
|
- spec/teaspoon/formatters/dot_formatter_spec.rb
|
229
|
+
- spec/teaspoon/formatters/json_formatter_spec.rb
|
217
230
|
- spec/teaspoon/formatters/junit_formatter_spec.rb
|
218
231
|
- spec/teaspoon/formatters/pride_formatter_spec.rb
|
232
|
+
- spec/teaspoon/formatters/snowday_formatter_spec.rb
|
219
233
|
- spec/teaspoon/formatters/tap_formatter_spec.rb
|
220
234
|
- spec/teaspoon/formatters/tap_y_formatter_spec.rb
|
221
235
|
- spec/teaspoon/formatters/teamcity_formatter_spec.rb
|
@@ -272,7 +286,6 @@ test_files:
|
|
272
286
|
- spec/dummy/config/environment.rb
|
273
287
|
- spec/dummy/config/environments/development.rb
|
274
288
|
- spec/dummy/config/environments/test.rb
|
275
|
-
- spec/dummy/config/initializers/teaspoon.rb
|
276
289
|
- spec/dummy/config/routes.rb
|
277
290
|
- spec/dummy/log/.gitkeep
|
278
291
|
- spec/dummy/public/favicon.ico
|
@@ -282,7 +295,9 @@ test_files:
|
|
282
295
|
- spec/features/html_reporter_spec.rb
|
283
296
|
- spec/features/install_generator_spec.rb
|
284
297
|
- spec/features/instrumentation_spec.rb
|
298
|
+
- spec/fixtures/coverage.json
|
285
299
|
- spec/javascripts/angular_helper.coffee
|
300
|
+
- spec/javascripts/fixtures/_body.html.erb
|
286
301
|
- spec/javascripts/fixtures/fixture.html.haml
|
287
302
|
- spec/javascripts/fixtures/fixture.json
|
288
303
|
- spec/javascripts/jasmine_helper.coffee
|
@@ -319,19 +334,25 @@ test_files:
|
|
319
334
|
- spec/javascripts/turbolinks_helper.coffee
|
320
335
|
- spec/spec_helper.rb
|
321
336
|
- spec/support/aruba.rb
|
322
|
-
- spec/teaspoon/check_coverage_spec.rb
|
323
337
|
- spec/teaspoon/command_line_spec.rb
|
324
338
|
- spec/teaspoon/configuration_spec.rb
|
325
339
|
- spec/teaspoon/console_spec.rb
|
326
340
|
- spec/teaspoon/coverage_spec.rb
|
341
|
+
- spec/teaspoon/drivers/base_spec.rb
|
327
342
|
- spec/teaspoon/drivers/phantomjs_driver_spec.rb
|
328
343
|
- spec/teaspoon/drivers/selenium_driver_spec.rb
|
329
344
|
- spec/teaspoon/engine_spec.rb
|
330
345
|
- spec/teaspoon/environment_spec.rb
|
331
|
-
- spec/teaspoon/
|
346
|
+
- spec/teaspoon/exceptions_spec.rb
|
347
|
+
- spec/teaspoon/exporter_spec.rb
|
348
|
+
- spec/teaspoon/formatters/base_spec.rb
|
349
|
+
- spec/teaspoon/formatters/clean_formatter_spec.rb
|
350
|
+
- spec/teaspoon/formatters/documentation_formatter_spec.rb
|
332
351
|
- spec/teaspoon/formatters/dot_formatter_spec.rb
|
352
|
+
- spec/teaspoon/formatters/json_formatter_spec.rb
|
333
353
|
- spec/teaspoon/formatters/junit_formatter_spec.rb
|
334
354
|
- spec/teaspoon/formatters/pride_formatter_spec.rb
|
355
|
+
- spec/teaspoon/formatters/snowday_formatter_spec.rb
|
335
356
|
- spec/teaspoon/formatters/tap_formatter_spec.rb
|
336
357
|
- spec/teaspoon/formatters/tap_y_formatter_spec.rb
|
337
358
|
- spec/teaspoon/formatters/teamcity_formatter_spec.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
class Teaspoon::SpecController < ActionController::Base
|
2
|
-
helper Teaspoon::SpecHelper rescue nil
|
3
|
-
|
4
|
-
layout false
|
5
|
-
|
6
|
-
unless Rails.application.config.assets.debug
|
7
|
-
rescue_from Exception, with: :javascript_exception
|
8
|
-
end
|
9
|
-
|
10
|
-
def suites
|
11
|
-
@suites = Teaspoon::Suite.all
|
12
|
-
end
|
13
|
-
|
14
|
-
def runner
|
15
|
-
@javascript_options = {}
|
16
|
-
@javascript_options[:instrument] = Teaspoon.configuration.coverage || params[:coverage] == "true"
|
17
|
-
@suite = Teaspoon::Suite.new(params)
|
18
|
-
end
|
19
|
-
|
20
|
-
def hooks
|
21
|
-
@suite = Teaspoon::Suite.new(params)
|
22
|
-
@suite.run_hooks(params[:group])
|
23
|
-
|
24
|
-
render nothing: true
|
25
|
-
end
|
26
|
-
|
27
|
-
def fixtures
|
28
|
-
prepend_view_path Teaspoon.configuration.root.join(Teaspoon.configuration.fixture_path)
|
29
|
-
render "/#{params[:filename]}"
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def javascript_exception(exception)
|
35
|
-
err = "#{exception.class.name}: #{exception.message}"
|
36
|
-
render text: "<script>throw Error(#{err.inspect})</script>"
|
37
|
-
end
|
38
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module Teaspoon::SpecHelper
|
2
|
-
|
3
|
-
def stylesheet_link_tag_for_teaspoon(*sources)
|
4
|
-
sources.collect do |source|
|
5
|
-
asset = defined?(lookup_asset_for_path) ? lookup_asset_for_path(source, type: :stylesheet) : asset_paths.asset_for(source, "css")
|
6
|
-
if asset.respond_to?(:logical_path)
|
7
|
-
asset.to_a.map do |dep|
|
8
|
-
stylesheet_link_tag(dep.pathname.to_s, href: asset_src(dep, source), type: "text/css").split("\n")
|
9
|
-
end
|
10
|
-
else
|
11
|
-
stylesheet_link_tag(source) unless source.blank?
|
12
|
-
end
|
13
|
-
end.flatten.uniq.join("\n").html_safe
|
14
|
-
end
|
15
|
-
|
16
|
-
def javascript_include_tag_for_teaspoon(*sources)
|
17
|
-
options = sources.extract_options!
|
18
|
-
sources.collect do |source|
|
19
|
-
asset = defined?(lookup_asset_for_path) ? lookup_asset_for_path(source, type: :javascript) : asset_paths.asset_for(source, "js")
|
20
|
-
if asset.respond_to?(:logical_path)
|
21
|
-
asset.to_a.map do |dep|
|
22
|
-
javascript_include_tag(dep.pathname.to_s, src: asset_src(dep, options[:instrument]), type: "text/javascript").split("\n")
|
23
|
-
end
|
24
|
-
else
|
25
|
-
javascript_include_tag(source) unless source.blank?
|
26
|
-
end
|
27
|
-
end.flatten.uniq.join("\n").html_safe
|
28
|
-
end
|
29
|
-
|
30
|
-
def asset_src(dep, instrument = false)
|
31
|
-
params = "?body=1"
|
32
|
-
params << "&instrument=1" if instrument && @suite && @suite.instrument_file?(dep.pathname.to_s)
|
33
|
-
|
34
|
-
"#{Teaspoon.configuration.context}#{Rails.application.config.assets.prefix}/#{dep.logical_path}#{params}"
|
35
|
-
end
|
36
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
<%= javascript_include_tag_for_teaspoon *@suite.helper, @javascript_options %>
|
2
|
-
<script type="text/javascript">
|
3
|
-
// When the DOM is loaded, we then use require to include currently selected file/suite, then once those are all loaded, we run Teaspoon
|
4
|
-
// @suite.spec_javascripts_for_require strips off the .js file extension
|
5
|
-
Teaspoon.onWindowLoad(function () {
|
6
|
-
// setup the Teaspoon path prefix to load /assets
|
7
|
-
require.config(
|
8
|
-
<% if Rails.application.config.respond_to?(:requirejs) %>
|
9
|
-
<%=raw Rails.application.config.requirejs.user_config.merge({baseUrl: Rails.application.config.assets.prefix}).to_json %>
|
10
|
-
<% else %>
|
11
|
-
{
|
12
|
-
baseUrl: Teaspoon.config.baseUrl || <%= Rails.application.config.assets.prefix.to_json.html_safe %>
|
13
|
-
}
|
14
|
-
<% end %>
|
15
|
-
);
|
16
|
-
|
17
|
-
require(<%=raw @suite.spec_javascripts_for_require.to_json %>, function () {
|
18
|
-
Teaspoon.execute();
|
19
|
-
});
|
20
|
-
});
|
21
|
-
</script>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Teaspoon :: Javascript Test Runner</title>
|
5
|
-
<meta name="viewport" content="width=device-width, user-scalable=no">
|
6
|
-
<%= csrf_meta_tags %>
|
7
|
-
<%= stylesheet_link_tag_for_teaspoon *@suite.stylesheets %>
|
8
|
-
<%= javascript_include_tag_for_teaspoon *@suite.core_javascripts %>
|
9
|
-
<script type="text/javascript">
|
10
|
-
Teaspoon.version = <%=raw Teaspoon::VERSION.inspect %>;
|
11
|
-
Teaspoon.root = <%=raw Teaspoon.configuration.mount_at.inspect %>;
|
12
|
-
Teaspoon.suites = <%=raw @suite.suites.to_json %>;
|
13
|
-
Teaspoon.config = <%=raw @suite.js_config.to_json %>;
|
14
|
-
</script>
|
15
|
-
<%= render @suite.boot_partial || 'standard' %>
|
16
|
-
</head>
|
17
|
-
<body data-no-turbolink>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# This file allows you to override various Teaspoon configuration directives when running from the command line. It is not
|
2
|
-
# required from within the Rails environment, so overriding directives that have been defined within the initializer
|
3
|
-
# is not possible.
|
4
|
-
#
|
5
|
-
# Set RAILS_ROOT and load the environment.
|
6
|
-
ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
|
7
|
-
require File.expand_path("../../config/environment", __FILE__)
|
8
|
-
|
9
|
-
# Provide default configuration.
|
10
|
-
#
|
11
|
-
# You can override various configuration directives defined here by using arguments with the teaspoon command.
|
12
|
-
#
|
13
|
-
# teaspoon --driver=selenium --suppress-log
|
14
|
-
# rake teaspoon DRIVER=selenium SUPPRESS_LOG=false
|
15
|
-
Teaspoon.setup do |config|
|
16
|
-
# Driver / Server
|
17
|
-
#config.driver = "phantomjs" # available: phantomjs, selenium
|
18
|
-
#config.server = nil # defaults to Rack::Server
|
19
|
-
|
20
|
-
# Behaviors
|
21
|
-
#config.server_timeout = 20 # timeout for starting the server
|
22
|
-
#config.server_port = nil # defaults to any open port unless specified
|
23
|
-
#config.fail_fast = true # abort after the first failing suite
|
24
|
-
|
25
|
-
# Output
|
26
|
-
#config.formatters = "dot" # available: dot, tap, tap_y, swayze_or_oprah
|
27
|
-
#config.suppress_log = false # suppress logs coming from console[log/error/debug]
|
28
|
-
#config.color = true
|
29
|
-
|
30
|
-
# Coverage (requires istanbul -- https://github.com/gotwarlost/istanbul)
|
31
|
-
#config.coverage = true
|
32
|
-
#config.coverage_reports = "text,html,cobertura"
|
33
|
-
#config.coverage_output_dir = "coverage"
|
34
|
-
#config.statements_coverage_threshold = 50
|
35
|
-
#config.functions_coverage_threshold = 50
|
36
|
-
#config.branches_coverage_threshold = 50
|
37
|
-
#config.lines_coverage_threshold = 50
|
38
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
Teaspoon.setup do |config|
|
2
|
-
|
3
|
-
# This determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
|
4
|
-
# http://localhost:3000/jasmine to run your specs.
|
5
|
-
config.mount_at = "/teaspoon"
|
6
|
-
|
7
|
-
# This defaults to Rails.root if left nil. If you're testing an engine using a dummy application it can be useful to
|
8
|
-
# set this to your engines root.. E.g. `Teaspoon::Engine.root`
|
9
|
-
config.root = nil
|
10
|
-
|
11
|
-
# These paths are appended to the Rails assets paths (relative to config.root), and by default is an array that you
|
12
|
-
# can replace or add to.
|
13
|
-
config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
|
14
|
-
|
15
|
-
# Fixtures are rendered through a standard controller. This means you can use things like HAML or RABL/JBuilder, etc.
|
16
|
-
# to generate fixtures within this path.
|
17
|
-
config.fixture_path = "spec/javascripts/fixtures"
|
18
|
-
|
19
|
-
# You can modify the default suite configuration and create new suites here. Suites can be isolated from one another.
|
20
|
-
# When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
|
21
|
-
# omit various directives and the defaults will be used.
|
22
|
-
#
|
23
|
-
# To run a specific suite
|
24
|
-
# - in the browser: http://localhost/teaspoon/[suite_name]
|
25
|
-
# - from the command line: rake teaspoon suite=[suite_name]
|
26
|
-
config.suite do |suite|
|
27
|
-
|
28
|
-
# You can specify a file matcher and all matching files will be loaded when the suite is run. It's important that
|
29
|
-
# these files are serve-able from sprockets.
|
30
|
-
#
|
31
|
-
# Note: Can also be set to nil.
|
32
|
-
suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
|
33
|
-
|
34
|
-
# Each suite can load a different helper, which can in turn require additional files. This file is loaded before
|
35
|
-
# your specs are loaded, and can be used as a manifest.
|
36
|
-
suite.helper = "spec_helper"
|
37
|
-
|
38
|
-
# These are the core Teaspoon javascripts. It's strongly encouraged to include only the base files here. You can
|
39
|
-
# require other support libraries in your spec helper, which allows you to change them without having to restart the
|
40
|
-
# server.
|
41
|
-
#
|
42
|
-
# Available frameworks: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit
|
43
|
-
#
|
44
|
-
# Note: To use the CoffeeScript source files use `"teaspoon/jasmine"` etc.
|
45
|
-
suite.javascripts = ["teaspoon-jasmine"]
|
46
|
-
|
47
|
-
# If you want to change how Teaspoon looks, or include your own stylesheets you can do that here. The default is the
|
48
|
-
# stylesheet for the HTML reporter.
|
49
|
-
suite.stylesheets = ["teaspoon"]
|
50
|
-
|
51
|
-
# When running coverage reports, you probably want to exclude libraries that you're not testing.
|
52
|
-
# Accepts an array of filenames or regular expressions. The default is to exclude assets from vendors or gems.
|
53
|
-
suite.no_coverage = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
|
54
|
-
# suite.no_coverage << "jquery.min.js" # excludes jquery from coverage reports
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
# Example suite. Since we're just filtering to files already within the root spec/javascripts, these files will also
|
59
|
-
# be run in the default suite -- but can be focused into a more specific suite.
|
60
|
-
#config.suite :targeted do |suite|
|
61
|
-
# suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
|
62
|
-
#end
|
63
|
-
|
64
|
-
end if defined?(Teaspoon) && Teaspoon.respond_to?(:setup) # let Teaspoon be undefined outside of development/test/asset groups
|