teaspoon 0.9.1 → 1.0.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 (214) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +141 -0
  3. data/README.md +9 -19
  4. data/{vendor → app}/assets/javascripts/support/bind-poly.js +0 -0
  5. data/{vendor → app}/assets/javascripts/support/sinon.js +0 -0
  6. data/app/assets/javascripts/teaspoon-filterer.js +55 -0
  7. data/app/assets/javascripts/teaspoon/error.coffee +5 -0
  8. data/app/assets/javascripts/teaspoon/{base/fixture.coffee → fixture.coffee} +15 -15
  9. data/app/assets/javascripts/teaspoon/{base/hook.coffee → hook.coffee} +0 -0
  10. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/console.coffee +18 -10
  11. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html.coffee +43 -40
  12. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/base_view.coffee +0 -0
  13. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/failure_view.coffee +2 -0
  14. data/app/assets/javascripts/teaspoon/reporters/html/progress_view.coffee +18 -0
  15. data/app/assets/javascripts/teaspoon/{base/reporters/html/progress_view.coffee → reporters/html/radial_progress_view.coffee} +1 -34
  16. data/app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee +15 -0
  17. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/spec_view.coffee +5 -3
  18. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/suite_view.coffee +4 -2
  19. data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/template.coffee +0 -0
  20. data/app/assets/javascripts/teaspoon/{base/runner.coffee → runner.coffee} +7 -3
  21. data/app/assets/javascripts/teaspoon/teaspoon.coffee +90 -32
  22. data/app/controllers/teaspoon/suite_controller.rb +5 -0
  23. data/app/views/teaspoon/suite/index.html.erb +1 -1
  24. data/lib/generators/teaspoon/install/install_generator.rb +67 -37
  25. data/lib/generators/teaspoon/install/templates/MISSING_FRAMEWORK +14 -0
  26. data/lib/generators/teaspoon/install/{POST_INSTALL → templates/POST_INSTALL} +0 -0
  27. data/lib/generators/teaspoon/install/templates/env.rb.tt +14 -0
  28. data/lib/generators/teaspoon/install/templates/{jasmine/env_comments.rb.tt → env_comments.rb.tt} +34 -43
  29. data/lib/tasks/teaspoon/info.rake +17 -0
  30. data/lib/teaspoon-devkit.rb +61 -0
  31. data/lib/teaspoon.rb +2 -0
  32. data/lib/teaspoon/command_line.rb +19 -14
  33. data/lib/teaspoon/configuration.rb +24 -35
  34. data/lib/teaspoon/console.rb +11 -21
  35. data/lib/teaspoon/coverage.rb +14 -7
  36. data/lib/teaspoon/deprecated.rb +22 -4
  37. data/lib/teaspoon/driver.rb +15 -0
  38. data/lib/teaspoon/driver/base.rb +7 -0
  39. data/lib/teaspoon/{drivers/capybara_webkit_driver.rb → driver/capybara_webkit.rb} +8 -5
  40. data/lib/teaspoon/{drivers/phantomjs_driver.rb → driver/phantomjs.rb} +8 -4
  41. data/lib/teaspoon/{drivers → driver}/phantomjs/runner.js +0 -0
  42. data/lib/teaspoon/{drivers/selenium_driver.rb → driver/selenium.rb} +11 -9
  43. data/lib/teaspoon/engine.rb +38 -25
  44. data/lib/teaspoon/environment.rb +24 -15
  45. data/lib/teaspoon/exceptions.rb +154 -41
  46. data/lib/teaspoon/exporter.rb +2 -2
  47. data/lib/teaspoon/formatter.rb +30 -0
  48. data/lib/teaspoon/{formatters → formatter}/base.rb +2 -36
  49. data/lib/teaspoon/{formatters/clean_formatter.rb → formatter/clean.rb} +4 -2
  50. data/lib/teaspoon/{formatters/documentation_formatter.rb → formatter/documentation.rb} +4 -3
  51. data/lib/teaspoon/{formatters/dot_formatter.rb → formatter/dot.rb} +4 -3
  52. data/lib/teaspoon/{formatters/json_formatter.rb → formatter/json.rb} +4 -2
  53. data/lib/teaspoon/{formatters/junit_formatter.rb → formatter/junit.rb} +3 -2
  54. data/lib/teaspoon/{formatters → formatter}/modules/report_module.rb +1 -1
  55. data/lib/teaspoon/{formatters/pride_formatter.rb → formatter/pride.rb} +4 -2
  56. data/lib/teaspoon/{formatters/rspec_html_formatter.rb → formatter/rspec_html.rb} +3 -2
  57. data/lib/teaspoon/{formatters/snowday_formatter.rb → formatter/snowday.rb} +3 -2
  58. data/lib/teaspoon/formatter/swayze_or_oprah.rb +111 -0
  59. data/lib/teaspoon/{formatters/tap_formatter.rb → formatter/tap.rb} +4 -2
  60. data/lib/teaspoon/{formatters/tap_y_formatter.rb → formatter/tap_y.rb} +3 -2
  61. data/lib/teaspoon/{formatters/teamcity_formatter.rb → formatter/teamcity.rb} +4 -2
  62. data/lib/teaspoon/framework.rb +17 -0
  63. data/lib/teaspoon/framework/base.rb +88 -0
  64. data/lib/teaspoon/instrumentation.rb +12 -2
  65. data/lib/teaspoon/registry.rb +47 -0
  66. data/lib/teaspoon/registry/has_default.rb +11 -0
  67. data/lib/teaspoon/runner.rb +6 -7
  68. data/lib/teaspoon/server.rb +2 -2
  69. data/lib/teaspoon/suite.rb +28 -30
  70. data/lib/teaspoon/utility.rb +5 -0
  71. data/lib/teaspoon/version.rb +1 -1
  72. metadata +52 -276
  73. data/app/assets/javascripts/teaspoon-jasmine.js +0 -1344
  74. data/app/assets/javascripts/teaspoon-mocha.js +0 -1350
  75. data/app/assets/javascripts/teaspoon-qunit.js +0 -1415
  76. data/app/assets/javascripts/teaspoon-teaspoon.js +0 -51
  77. data/app/assets/javascripts/teaspoon/base/teaspoon.coffee +0 -69
  78. data/app/assets/javascripts/teaspoon/jasmine.coffee +0 -119
  79. data/app/assets/javascripts/teaspoon/jasmine/reporters/html.coffee +0 -11
  80. data/app/assets/javascripts/teaspoon/mocha.coffee +0 -90
  81. data/app/assets/javascripts/teaspoon/mocha/reporters/console.coffee +0 -16
  82. data/app/assets/javascripts/teaspoon/mocha/reporters/html.coffee +0 -27
  83. data/app/assets/javascripts/teaspoon/qunit.coffee +0 -81
  84. data/app/assets/javascripts/teaspoon/qunit/reporters/console.coffee +0 -25
  85. data/app/assets/javascripts/teaspoon/qunit/reporters/html.coffee +0 -80
  86. data/lib/generators/teaspoon/install/templates/jasmine/env.rb +0 -11
  87. data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.coffee +0 -31
  88. data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.js +0 -31
  89. data/lib/generators/teaspoon/install/templates/mocha/env.rb +0 -11
  90. data/lib/generators/teaspoon/install/templates/mocha/env_comments.rb.tt +0 -187
  91. data/lib/generators/teaspoon/install/templates/mocha/spec_helper.coffee +0 -40
  92. data/lib/generators/teaspoon/install/templates/mocha/spec_helper.js +0 -40
  93. data/lib/generators/teaspoon/install/templates/qunit/env.rb +0 -11
  94. data/lib/generators/teaspoon/install/templates/qunit/env_comments.rb.tt +0 -187
  95. data/lib/generators/teaspoon/install/templates/qunit/test_helper.coffee +0 -29
  96. data/lib/generators/teaspoon/install/templates/qunit/test_helper.js +0 -30
  97. data/lib/teaspoon/drivers/base.rb +0 -10
  98. data/lib/teaspoon/formatters/description.rb +0 -36
  99. data/lib/teaspoon/formatters/swayze_or_oprah_formatter.rb +0 -101
  100. data/spec/dummy/Rakefile +0 -7
  101. data/spec/dummy/app/assets/javascripts/instrumented1.coffee +0 -1
  102. data/spec/dummy/app/assets/javascripts/instrumented2.coffee +0 -1
  103. data/spec/dummy/app/assets/javascripts/integration/integration.coffee +0 -1
  104. data/spec/dummy/app/assets/javascripts/integration/integration_spec.coffee +0 -32
  105. data/spec/dummy/app/assets/javascripts/integration/spec_helper.coffee +0 -7
  106. data/spec/dummy/app/assets/javascripts/specs/asset_spec.js +0 -11
  107. data/spec/dummy/config.ru +0 -15
  108. data/spec/dummy/config/application.rb +0 -29
  109. data/spec/dummy/config/boot.rb +0 -3
  110. data/spec/dummy/config/environment.rb +0 -5
  111. data/spec/dummy/config/environments/development.rb +0 -41
  112. data/spec/dummy/config/environments/production.rb +0 -79
  113. data/spec/dummy/config/environments/test.rb +0 -42
  114. data/spec/dummy/config/routes.rb +0 -2
  115. data/spec/dummy/config/secrets.yml +0 -22
  116. data/spec/dummy/log/.gitkeep +0 -0
  117. data/spec/dummy/public/favicon.ico +0 -0
  118. data/spec/dummy/script/rails +0 -6
  119. data/spec/features/console_reporter_spec.rb +0 -62
  120. data/spec/features/hooks_spec.rb +0 -60
  121. data/spec/features/html_reporter_spec.rb +0 -81
  122. data/spec/features/install_generator_spec.rb +0 -54
  123. data/spec/features/instrumentation_spec.rb +0 -21
  124. data/spec/fixtures/coverage.json +0 -243
  125. data/spec/javascripts/fixtures/_body.html.erb +0 -1
  126. data/spec/javascripts/fixtures/fixture.html.haml +0 -4
  127. data/spec/javascripts/fixtures/fixture.json +0 -4
  128. data/spec/javascripts/jasmine_helper.coffee +0 -3
  129. data/spec/javascripts/mocha_helper.coffee +0 -4
  130. data/spec/javascripts/spec_helper.coffee +0 -7
  131. data/spec/javascripts/stylesheets/stylesheet.css.scss +0 -0
  132. data/spec/javascripts/support/json2.js +0 -486
  133. data/spec/javascripts/support/support.js.coffee +0 -0
  134. data/spec/javascripts/teaspoon/base/fixture_spec.coffee +0 -93
  135. data/spec/javascripts/teaspoon/base/reporters/console_spec.coffee +0 -162
  136. data/spec/javascripts/teaspoon/base/reporters/html/base_view_spec.coffee +0 -88
  137. data/spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee +0 -28
  138. data/spec/javascripts/teaspoon/base/reporters/html/progress_view_spec.coffee +0 -1
  139. data/spec/javascripts/teaspoon/base/reporters/html/spec_view_spec.coffee +0 -1
  140. data/spec/javascripts/teaspoon/base/reporters/html/suite_view_spec.coffee +0 -1
  141. data/spec/javascripts/teaspoon/base/reporters/html_spec.coffee +0 -372
  142. data/spec/javascripts/teaspoon/base/runner_spec.coffee +0 -58
  143. data/spec/javascripts/teaspoon/base/teaspoon_spec.coffee +0 -47
  144. data/spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee +0 -13
  145. data/spec/javascripts/teaspoon/jasmine/models_jspec.coffee +0 -101
  146. data/spec/javascripts/teaspoon/jasmine/reporters/html_jspec.coffee +0 -17
  147. data/spec/javascripts/teaspoon/jasmine/runner_jspec.coffee +0 -59
  148. data/spec/javascripts/teaspoon/jasmine/spec_jspec.coffee +0 -3
  149. data/spec/javascripts/teaspoon/mocha/fixture_mspec.coffee +0 -12
  150. data/spec/javascripts/teaspoon/mocha/models_mspec.coffee +0 -93
  151. data/spec/javascripts/teaspoon/mocha/reporters/console_mspec.coffee +0 -24
  152. data/spec/javascripts/teaspoon/mocha/reporters/html_mspec.coffee +0 -41
  153. data/spec/javascripts/teaspoon/mocha/runner_mspec.coffee +0 -23
  154. data/spec/javascripts/teaspoon/mocha/spec_mspec.coffee +0 -9
  155. data/spec/javascripts/teaspoon/other/erb_spec.js.coffee.erb +0 -4
  156. data/spec/javascripts/teaspoon/phantomjs/runner_spec.coffee +0 -161
  157. data/spec/javascripts/turbolinks_helper.coffee +0 -2
  158. data/spec/spec_helper.rb +0 -25
  159. data/spec/support/aruba.rb +0 -15
  160. data/spec/teaspoon/command_line_spec.rb +0 -157
  161. data/spec/teaspoon/configuration_spec.rb +0 -236
  162. data/spec/teaspoon/console_spec.rb +0 -224
  163. data/spec/teaspoon/coverage_spec.rb +0 -118
  164. data/spec/teaspoon/drivers/base_spec.rb +0 -5
  165. data/spec/teaspoon/drivers/capybara_webkit_driver_spec.rb +0 -39
  166. data/spec/teaspoon/drivers/phantomjs_driver_spec.rb +0 -66
  167. data/spec/teaspoon/drivers/selenium_driver_spec.rb +0 -68
  168. data/spec/teaspoon/engine_spec.rb +0 -22
  169. data/spec/teaspoon/environment_spec.rb +0 -109
  170. data/spec/teaspoon/exceptions_spec.rb +0 -57
  171. data/spec/teaspoon/exporter_spec.rb +0 -96
  172. data/spec/teaspoon/formatters/base_spec.rb +0 -259
  173. data/spec/teaspoon/formatters/clean_formatter_spec.rb +0 -37
  174. data/spec/teaspoon/formatters/documentation_formatter_spec.rb +0 -127
  175. data/spec/teaspoon/formatters/dot_formatter_spec.rb +0 -116
  176. data/spec/teaspoon/formatters/json_formatter_spec.rb +0 -77
  177. data/spec/teaspoon/formatters/junit_formatter_spec.rb +0 -114
  178. data/spec/teaspoon/formatters/pride_formatter_spec.rb +0 -37
  179. data/spec/teaspoon/formatters/rspec_html_formatter_spec.rb +0 -107
  180. data/spec/teaspoon/formatters/snowday_formatter_spec.rb +0 -35
  181. data/spec/teaspoon/formatters/tap_formatter_spec.rb +0 -72
  182. data/spec/teaspoon/formatters/tap_y_formatter_spec.rb +0 -80
  183. data/spec/teaspoon/formatters/teamcity_formatter_spec.rb +0 -148
  184. data/spec/teaspoon/instrumentation_spec.rb +0 -113
  185. data/spec/teaspoon/result_spec.rb +0 -98
  186. data/spec/teaspoon/runner_spec.rb +0 -116
  187. data/spec/teaspoon/server_spec.rb +0 -105
  188. data/spec/teaspoon/suite_spec.rb +0 -138
  189. data/spec/teaspoon_env.rb +0 -39
  190. data/test/javascripts/qunit_helper.coffee +0 -3
  191. data/test/javascripts/teaspoon/qunit/fixture_test.coffee +0 -10
  192. data/test/javascripts/teaspoon/qunit/models_test.coffee +0 -66
  193. data/test/javascripts/teaspoon/qunit/reporters/console_test.coffee +0 -3
  194. data/test/javascripts/teaspoon/qunit/reporters/html/failure_view_test.coffee +0 -3
  195. data/test/javascripts/teaspoon/qunit/reporters/html/spec_view_test.coffee +0 -3
  196. data/test/javascripts/teaspoon/qunit/reporters/html/suite_view_test.coffee +0 -3
  197. data/test/javascripts/teaspoon/qunit/reporters/html_test.coffee +0 -3
  198. data/test/javascripts/teaspoon/qunit/runner_test.coffee +0 -18
  199. data/vendor/assets/javascripts/jasmine/1.3.1.js +0 -2602
  200. data/vendor/assets/javascripts/jasmine/2.0.0.js +0 -2412
  201. data/vendor/assets/javascripts/jasmine/MIT.LICENSE +0 -20
  202. data/vendor/assets/javascripts/mocha/1.10.0.js +0 -5374
  203. data/vendor/assets/javascripts/mocha/1.17.1.js +0 -5813
  204. data/vendor/assets/javascripts/mocha/MIT.LICENSE +0 -22
  205. data/vendor/assets/javascripts/qunit/1.12.0.js +0 -2212
  206. data/vendor/assets/javascripts/qunit/1.14.0.js +0 -2288
  207. data/vendor/assets/javascripts/qunit/MIT.LICENSE +0 -21
  208. data/vendor/assets/javascripts/support/chai-1.10.0.js +0 -4800
  209. data/vendor/assets/javascripts/support/chai-jq-0.0.7.js +0 -524
  210. data/vendor/assets/javascripts/support/chai.js +0 -4782
  211. data/vendor/assets/javascripts/support/expect.js +0 -1284
  212. data/vendor/assets/javascripts/support/jasmine-jquery-1.7.0.js +0 -720
  213. data/vendor/assets/javascripts/support/jasmine-jquery-2.0.0.js +0 -812
  214. data/vendor/assets/javascripts/support/sinon-chai.js +0 -126
@@ -1,25 +0,0 @@
1
- class Teaspoon.Reporters.Console extends Teaspoon.Reporters.Console
2
-
3
- constructor: (env) ->
4
- super
5
- env.log(@reportSpecResults)
6
- env.testDone(@reportSpecResults)
7
- env.done(@reportRunnerResults)
8
- @reportRunnerStarting()
9
-
10
-
11
- reportRunnerStarting: ->
12
- @currentAssertions = []
13
- @log
14
- type: "runner"
15
- total: null
16
- start: JSON.parse(JSON.stringify(@start))
17
-
18
-
19
- reportSpecResults: (result) =>
20
- unless typeof(result.total) == "number"
21
- @currentAssertions.push(result)
22
- return
23
- result.assertions = @currentAssertions
24
- @currentAssertions = []
25
- super(result)
@@ -1,80 +0,0 @@
1
- class Teaspoon.Reporters.HTML extends Teaspoon.Reporters.HTML
2
-
3
- constructor: (env) ->
4
- super
5
- env.log(@reportSpecResults)
6
- env.testDone(@reportSpecResults)
7
- env.done(@reportRunnerResults)
8
- @currentAssertions = []
9
- @reportRunnerStarting()
10
-
11
-
12
- reportRunnerStarting: ->
13
- @total.exist = null
14
- @setText("stats-duration", "...")
15
-
16
-
17
- reportSpecResults: (spec) =>
18
- unless typeof(spec.total) == "number"
19
- @currentAssertions.push(spec)
20
- return
21
- spec.assertions = @currentAssertions
22
- @currentAssertions = []
23
- @reportSpecStarting(spec)
24
- super(spec)
25
-
26
-
27
- reportRunnerResults: (result) =>
28
- @total.exist = @total.run = result.total
29
- super
30
-
31
-
32
- readConfig: ->
33
- super
34
- QUnit.config.notrycatch = @config["use-catch"]
35
-
36
-
37
- envInfo: ->
38
- "qunit #{_qunit_version || "[unknown version]"}"
39
-
40
-
41
-
42
- class Teaspoon.Reporters.HTML.SpecView extends Teaspoon.Reporters.HTML.SpecView
43
-
44
- buildErrors: ->
45
- div = @createEl("div")
46
- html = ""
47
- for error in @spec.errors()
48
- html += """<strong>#{error.message}</strong><br/>#{@htmlSafe(error.stack || "Stack trace unavailable")}<br/>"""
49
- div.innerHTML = html
50
- @append(div)
51
-
52
-
53
- buildParent: ->
54
- parent = @spec.parent
55
- return @reporter unless parent
56
- if @views.suites[parent.description]
57
- @views.suites[parent.description]
58
- else
59
- view = new Teaspoon.Reporters.HTML.SuiteView(parent, @reporter)
60
- @views.suites[parent.description] = view
61
-
62
-
63
-
64
- class Teaspoon.Reporters.HTML.FailureView extends Teaspoon.Reporters.HTML.FailureView
65
-
66
- build: ->
67
- super("spec")
68
- html = """<h1 class="teaspoon-clearfix"><a href="#{@spec.link}">#{@htmlSafe(@spec.fullDescription)}</a></h1>"""
69
- for error in @spec.errors()
70
- html += """<div><strong>#{error.message}</strong><br/>#{@htmlSafe(error.stack || "Stack trace unavailable")}</div>"""
71
- @el.innerHTML = html
72
-
73
-
74
-
75
- class Teaspoon.Reporters.HTML.SuiteView extends Teaspoon.Reporters.HTML.SuiteView
76
-
77
- constructor: (@suite, @reporter) ->
78
- @views = @reporter.views
79
- @views.suites[@suite.description] = @
80
- @build()
@@ -1,11 +0,0 @@
1
- # Set RAILS_ROOT and load the environment if it's not already loaded.
2
- unless defined?(Rails)
3
- ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
4
- require File.expand_path("../../config/environment", __FILE__)
5
- end
6
-
7
- Teaspoon.configure do |config|
8
- config.suite do |suite|
9
- suite.use_framework :jasmine, "1.3.1"
10
- end
11
- end
@@ -1,31 +0,0 @@
1
- # Teaspoon includes some support files, but you can use anything from your own support path too.
2
- # require support/jasmine-jquery-1.7.0
3
- # require support/jasmine-jquery-2.0.0
4
- # require support/sinon
5
- # require support/your-support-file
6
- #
7
- # PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
8
- # Use this polyfill to avoid the confusion.
9
- #= require support/bind-poly
10
- #
11
- # You can require your own javascript files here. By default this will include everything in application, however you
12
- # may get better load performance if you require the specific files that are being used in the spec that tests them.
13
- #= require application
14
- #
15
- # Deferring execution
16
- # If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
17
- # Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
18
- #
19
- # Teaspoon.defer = true
20
- # setTimeout(Teaspoon.execute, 1000)
21
- #
22
- # Matching files
23
- # By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
24
- # spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
25
- # configuration in teaspoon_env.rb
26
- #
27
- # Manifest
28
- # If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
29
- # the configuration and use this file as a manifest.
30
- #
31
- # For more information: http://github.com/modeset/teaspoon
@@ -1,31 +0,0 @@
1
- // Teaspoon includes some support files, but you can use anything from your own support path too.
2
- // require support/jasmine-jquery-1.7.0
3
- // require support/jasmine-jquery-2.0.0
4
- // require support/sinon
5
- // require support/your-support-file
6
- //
7
- // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
8
- // Use this polyfill to avoid the confusion.
9
- //= require support/bind-poly
10
- //
11
- // You can require your own javascript files here. By default this will include everything in application, however you
12
- // may get better load performance if you require the specific files that are being used in the spec that tests them.
13
- //= require application
14
- //
15
- // Deferring execution
16
- // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
17
- // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
18
- //
19
- // Teaspoon.defer = true
20
- // setTimeout(Teaspoon.execute, 1000)
21
- //
22
- // Matching files
23
- // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
24
- // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
25
- // configuration in teaspoon_env.rb
26
- //
27
- // Manifest
28
- // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
29
- // the configuration and use this file as a manifest.
30
- //
31
- // For more information: http://github.com/modeset/teaspoon
@@ -1,11 +0,0 @@
1
- # Set RAILS_ROOT and load the environment if it's not already loaded.
2
- unless defined?(Rails)
3
- ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
4
- require File.expand_path("../../config/environment", __FILE__)
5
- end
6
-
7
- Teaspoon.configure do |config|
8
- config.suite do |suite|
9
- suite.use_framework :mocha
10
- end
11
- end
@@ -1,187 +0,0 @@
1
- # Set RAILS_ROOT and load the environment if it's not already loaded.
2
- unless defined?(Rails)
3
- ENV["RAILS_ROOT"] = File.expand_path("../../", __FILE__)
4
- require File.expand_path("../../config/environment", __FILE__)
5
- end
6
-
7
- Teaspoon.configure do |config|
8
-
9
- # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
10
- # `http://localhost:3000/jasmine` to run your tests.
11
- #config.mount_at = "/teaspoon"
12
-
13
- # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
14
- # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
15
- # Note: Defaults to `Rails.root` if nil.
16
- #config.root = nil
17
-
18
- # Paths that will be appended to the Rails assets paths
19
- # Note: Relative to `config.root`.
20
- #config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
21
-
22
- # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
23
- # be rendered as fixtures.
24
- #config.fixture_paths = ["spec/javascripts/fixtures"]
25
-
26
- # SUITES
27
- #
28
- # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
29
- #
30
- # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
31
- # omit various directives and the ones defined in the default suite will be used.
32
- #
33
- # To run a specific suite
34
- # - in the browser: http://localhost/teaspoon/[suite_name]
35
- # - with the rake task: rake teaspoon suite=[suite_name]
36
- # - with the cli: teaspoon --suite=[suite_name]
37
- config.suite do |suite|
38
-
39
- # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
40
- # you -- which you can override with the directives below. This should be specified first, as it can override other
41
- # directives.
42
- # Note: If no version is specified, the latest is assumed.
43
- #
44
- # Available: jasmine[1.3.1], mocha[1.10.0, 1.17.1] qunit[1.12.0, 1.14.0]
45
- suite.use_framework :mocha
46
-
47
- # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
48
- # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
49
- #suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
50
-
51
- # This suites spec helper, which can require additional support files. This file is loaded before any of your test
52
- # files are loaded.
53
- #suite.helper = "spec_helper"
54
-
55
- # The core Teaspoon javascripts. It's recommended to include only the base files here, as you can require support
56
- # libraries from your spec helper.
57
- # Note: For CoffeeScript files use `"teaspoon/jasmine"` etc.
58
- #
59
- # Available: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit
60
- #suite.javascripts = ["mocha/1.17.1", "teaspoon-mocha"]
61
-
62
- # You can include your own stylesheets if you want to change how Teaspoon looks.
63
- # Note: Spec related CSS can and should be loaded using fixtures.
64
- #suite.stylesheets = ["teaspoon"]
65
-
66
- # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
67
- # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
68
- #
69
- # Available: boot, boot_require_js
70
- #suite.boot_partial = "boot"
71
-
72
- # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
73
- #suite.body_partial = "body"
74
-
75
- # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
76
- # default excludes assets from vendor, gems and support libraries.<br/><br/>
77
- #suite.no_coverage = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
78
-
79
- # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
80
- # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
81
- #suite.hook :fixtures, proc{ }
82
-
83
- # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
84
- # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
85
- # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
86
- #suite.expand_assets = false
87
-
88
- end
89
-
90
- # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
91
- # be run in the default suite -- but can be focused into a more specific suite.
92
- #config.suite :targeted do |suite|
93
- # suite.matcher = "test/javascripts/targeted/*_test.{js,js.coffee,coffee}"
94
- #end
95
-
96
- # CONSOLE RUNNER SPECIFIC
97
- #
98
- # These configuration directives are applicable only when running via the rake task or command line interface. These
99
- # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
100
- # task.
101
- #
102
- # Command Line Interface:
103
- # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
104
- #
105
- # Rake:
106
- # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
107
-
108
- # Specify which headless driver to use. Supports PhantomJS and Selenium Webdriver.
109
- #
110
- # Available: phantomjs, selenium
111
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
112
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
113
- #config.driver = "phantomjs"
114
-
115
- # Specify additional options for the driver.
116
- #
117
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
118
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
119
- #config.driver_options = nil
120
-
121
- # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
122
- # considered a failure. This is to avoid issues that can arise where tests stall.
123
- #config.driver_timeout = 180
124
-
125
- # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
126
- #config.server = nil
127
-
128
- # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
129
- #config.server_port = nil
130
-
131
- # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
132
- # want to lower this if you know it shouldn't take long to start.
133
- #config.server_timeout = 20
134
-
135
- # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
136
- # several suites, but in environments like CI this may not be desirable.
137
- #config.fail_fast = true
138
-
139
- # Specify the formatters to use when outputting the results.
140
- # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
141
- #
142
- # Available: <%= Teaspoon::Formatters.known_formatters.map(&:name).join ", " %>
143
- #config.formatters = ["<%= Teaspoon::Formatters.known_formatters.select(&:default?).first.name %>"]
144
-
145
- # Specify if you want color output from the formatters.
146
- #config.color = true
147
-
148
- # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
149
- # remove them, but in verbose applications this may not be desirable.
150
- #config.suppress_log = false
151
-
152
- # COVERAGE REPORTS / THRESHOLD ASSERTIONS
153
- #
154
- # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
155
- # display coverage statistics.
156
- #
157
- # Coverage configurations are similar to suites. You can define several, and use different ones under different
158
- # conditions.
159
- #
160
- # To run with a specific coverage configuration
161
- # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
162
- # - with the cli: teaspoon --coverage=[coverage_name]
163
-
164
- # Specify that you always want a coverage configuration to be used.
165
- #config.use_coverage = nil
166
-
167
- config.coverage do |coverage|
168
-
169
- # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
170
- #
171
- # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
172
- #coverage.reports = ["text-summary", "html"]
173
-
174
- # The path that the coverage should be written to - when there's an artifact to write to disk.
175
- # Note: Relative to `config.root`.
176
- #coverage.output_path = "coverage"
177
-
178
- # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
179
- # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
180
- #coverage.statements = nil
181
- #coverage.functions = nil
182
- #coverage.branches = nil
183
- #coverage.lines = nil
184
-
185
- end
186
-
187
- end
@@ -1,40 +0,0 @@
1
- # Teaspoon includes some support files, but you can use anything from your own support path too.
2
- # require support/expect
3
- # require support/sinon
4
- # require support/chai
5
- # require support/chai-jq-0.0.7
6
- # require support/your-support-file
7
- #
8
- # PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
9
- # Use this polyfill to avoid the confusion.
10
- #= require support/bind-poly
11
- #
12
- # You can require your own javascript files here. By default this will include everything in application, however you
13
- # may get better load performance if you require the specific files that are being used in the spec that tests them.
14
- #= require application
15
- #
16
- # Deferring execution
17
- # If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
18
- # Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
19
- #
20
- # Teaspoon.defer = true
21
- # setTimeout(Teaspoon.execute, 1000)
22
- #
23
- # Matching files
24
- # By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
25
- # spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
26
- # configuration in teaspoon_env.rb
27
- #
28
- # Manifest
29
- # If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
30
- # the configuration and use this file as a manifest.
31
- #
32
- # For more information: http://github.com/modeset/teaspoon
33
- #
34
- # Chai
35
- # If you're using Chai, you'll probably want to initialize your preferred assertion style. You can read more about Chai
36
- # at: http://chaijs.com/guide/styles
37
- #
38
- # window.assert = chai.assert
39
- # window.expect = chai.expect
40
- # window.should = chai.should()
@@ -1,40 +0,0 @@
1
- // Teaspoon includes some support files, but you can use anything from your own support path too.
2
- // require support/expect
3
- // require support/sinon
4
- // require support/chai
5
- // require support/chai-jq-0.0.7
6
- // require support/your-support-file
7
- //
8
- // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
9
- // Use this polyfill to avoid the confusion.
10
- //= require support/bind-poly
11
- //
12
- // You can require your own javascript files here. By default this will include everything in application, however you
13
- // may get better load performance if you require the specific files that are being used in the spec that tests them.
14
- //= require application
15
- //
16
- // Deferring execution
17
- // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
18
- // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
19
- //
20
- // Teaspoon.defer = true
21
- // setTimeout(Teaspoon.execute, 1000)
22
- //
23
- // Matching files
24
- // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
25
- // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
26
- // configuration in teaspoon_env.rb
27
- //
28
- // Manifest
29
- // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
30
- // the configuration and use this file as a manifest.
31
- //
32
- // For more information: http://github.com/modeset/teaspoon
33
- //
34
- // Chai
35
- // If you're using Chai, you'll probably want to initialize your preferred assertion style. You can read more about Chai
36
- // at: http://chaijs.com/guide/styles
37
- //
38
- // window.assert = chai.assert;
39
- // window.expect = chai.expect;
40
- // window.should = chai.should();