teaspoon 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,7 +0,0 @@
1
- window.onload = ->
2
- el = document.createElement("DIV")
3
- el.id = "spec_helper_el"
4
- el.innerHTML = "this was generated by the spec_helper"
5
- document.body.appendChild(el)
6
-
7
- foo = foo()
@@ -1,11 +0,0 @@
1
- describe("asset_spec.js", function() {
2
-
3
- it("tests", function() {
4
- expect(true).toEqual(true)
5
- })
6
-
7
- it("allows focused tests", function() {
8
- expect(true).toEqual(true)
9
- })
10
-
11
- });
data/spec/dummy/config.ru DELETED
@@ -1,15 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require 'rails/commands/server'
4
-
5
- module Rails
6
- class Server
7
- alias :default_options_alias :default_options
8
- def default_options
9
- default_options_alias.merge!(:Port => 3333)
10
- end
11
- end
12
- end
13
-
14
- require ::File.expand_path('../config/environment', __FILE__)
15
- run Dummy::Application
@@ -1,29 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require "action_controller/railtie"
4
- require "sprockets/railtie"
5
-
6
- # Require the gems listed in Gemfile, including any gems
7
- # you've limited to :test, :development, or :production.
8
- Bundler.require(*Rails.groups)
9
-
10
- module Dummy
11
- class Application < Rails::Application
12
- # Settings in config/environments/* take precedence over those specified here.
13
- # Application configuration should go into files in config/initializers
14
- # -- all .rb files in that directory are automatically loaded.
15
-
16
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
17
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
18
- # config.time_zone = 'Central Time (US & Canada)'
19
-
20
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
21
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
22
- # config.i18n.default_locale = :de
23
-
24
- # Change our relative root url to show that if relative paths are setup properly, teaspoon will
25
- # continue to work and load the proper urls.
26
- config.relative_url_root = "/relative"
27
- config.assets.prefix = "/relative/assets" # this must be set for any asset paths to be correct!
28
- end
29
- end
@@ -1,3 +0,0 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
-
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,41 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- # config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raise an error on page load if there are pending migrations.
23
- # config.active_record.migration_error = :page_load
24
-
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
-
30
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
- # yet still be able to expire them through the digest params.
32
- config.assets.digest = true
33
-
34
- # Adds additional error checking when serving assets at runtime.
35
- # Checks for improperly declared sprockets dependencies.
36
- # Raises helpful error messages.
37
- config.assets.raise_runtime_errors = true
38
-
39
- # Raises error for missing translations
40
- # config.action_view.raise_on_missing_translations = true
41
- end
@@ -1,79 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
22
-
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
-
27
- # Compress JavaScripts and CSS.
28
- config.assets.js_compressor = :uglifier
29
- # config.assets.css_compressor = :sass
30
-
31
- # Do not fallback to assets pipeline if a precompiled asset is missed.
32
- config.assets.compile = false
33
-
34
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
- # yet still be able to expire them through the digest params.
36
- config.assets.digest = true
37
-
38
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39
-
40
- # Specifies the header that your server uses for sending files.
41
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43
-
44
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
- # config.force_ssl = true
46
-
47
- # Use the lowest log level to ensure availability of diagnostic information
48
- # when problems arise.
49
- config.log_level = :debug
50
-
51
- # Prepend all log lines with the following tags.
52
- # config.log_tags = [ :subdomain, :uuid ]
53
-
54
- # Use a different logger for distributed setups.
55
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56
-
57
- # Use a different cache store in production.
58
- # config.cache_store = :mem_cache_store
59
-
60
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
- # config.action_controller.asset_host = 'http://assets.example.com'
62
-
63
- # Ignore bad email addresses and do not raise email delivery errors.
64
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
- # config.action_mailer.raise_delivery_errors = false
66
-
67
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
- config.i18n.fallbacks = true
70
-
71
- # Send deprecation notices to registered listeners.
72
- config.active_support.deprecation = :notify
73
-
74
- # Use default logging formatter so that PID and timestamp are not suppressed.
75
- config.log_formatter = ::Logger::Formatter.new
76
-
77
- # Do not dump schema after migrations.
78
- # config.active_record.dump_schema_after_migration = false
79
- end
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
18
-
19
- # Show full error reports and disable caching.
20
- config.consider_all_requests_local = true
21
- config.action_controller.perform_caching = false
22
-
23
- # Raise exceptions instead of rendering exception templates.
24
- config.action_dispatch.show_exceptions = false
25
-
26
- # Disable request forgery protection in test environment.
27
- config.action_controller.allow_forgery_protection = false
28
-
29
- # Tell Action Mailer not to deliver emails to the real world.
30
- # The :test delivery method accumulates sent emails in the
31
- # ActionMailer::Base.deliveries array.
32
- # config.action_mailer.delivery_method = :test
33
-
34
- # Randomize the order test cases are executed.
35
- config.active_support.test_order = :random
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end
@@ -1,2 +0,0 @@
1
- Rails.application.routes.draw do
2
- end
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: a28312cb73c1f3bc98f5fa393a6d8347d067ef9c24ac90f40e8ea98315d448cfd0ebcf9079b04eb77358afd81522a521ddc1c5bc30b31d3cbf812ef904dd55a2
15
-
16
- test:
17
- secret_key_base: 8fe67c730ce5c57f02cb83acf73e4d527b45e805639b2e9f56a6dc7cf579affa4838d75432903bbeb7f4766ec57d8392ff0f42e630615cbc2d564f8242a4471c
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
File without changes
File without changes
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,62 +0,0 @@
1
- require "spec_helper"
2
-
3
- feature "testing with teaspoon in the console", aruba: true do
4
-
5
- scenario "gives me the expected results" do
6
- run_simple("bundle exec teaspoon -r ../../spec/teaspoon_env.rb --suite=default app/assets/javascripts/integration/integration_spec.coffee", false)
7
-
8
- expected = <<-OUTPUT.strip_heredoc
9
- Teaspoon running default suite at http://127.0.0.1:31337/teaspoon/default
10
- TypeError: 'undefined' is not a function (evaluating 'foo()')
11
- # http://127.0.0.1:31337/relative/assets/integration/spec_helper.js:12
12
- OUTPUT
13
- output = all_output.gsub(/127\.0\.0\.1:\d+/, "127.0.0.1:31337")
14
- output = output.gsub("undefined is not a constructor", "'undefined' is not a function")
15
- assert_partial_output(expected, output)
16
-
17
- expected = <<-OUTPUT.strip_heredoc
18
- testing console output
19
- ..FF.*.
20
-
21
- Pending:
22
- Integration tests pending is allowed
23
- # Not yet implemented
24
-
25
- Failures:
26
-
27
- 1) Integration tests allows failing specs
28
- Failure/Error: Expected true to be false.
29
-
30
- 2) Integration tests allows erroring specs
31
- Failure/Error: ReferenceError: Can't find variable: foo in http://127.0.0.1:31337/relative/assets/integration/integration_spec.js?body=1 (line 14)
32
-
33
- Finished in 0.31337 seconds
34
- 7 examples, 2 failures, 1 pending
35
-
36
- Failed examples:
37
-
38
- teaspoon -s default --filter="Integration tests allows failing specs."
39
- teaspoon -s default --filter="Integration tests allows erroring specs."
40
- OUTPUT
41
- output = all_output.gsub(/127\.0\.0\.1:\d+/, "127.0.0.1:31337")
42
- output = output.gsub(/Finished in [\d\.]+ seconds/, "Finished in 0.31337 seconds")
43
- assert_partial_output(expected, output)
44
- end
45
-
46
- describe "with coverage" do
47
-
48
- scenario "displays coverage information" do
49
- pending("needs istanbul to be installed") unless Teaspoon::Instrumentation.executable
50
- run_simple("bundle exec teaspoon -r ../../spec/teaspoon_env.rb --coverage=default app/assets/javascripts/integration/integration_spec.coffee", false)
51
-
52
- assert_partial_output("=============================== Coverage summary ===============================", all_output)
53
- assert_partial_output("Statements : 95.83% ( 23/24 )", all_output)
54
- assert_partial_output("Branches : 100% ( 0/0 )", all_output)
55
- assert_partial_output("Functions : 92.31% ( 12/13 )", all_output)
56
- assert_partial_output("Lines : 95.83% ( 23/24 )", all_output)
57
- assert_partial_output("================================================================================", all_output)
58
- end
59
-
60
- end
61
-
62
- end
@@ -1,60 +0,0 @@
1
- require "spec_helper"
2
- require "tempfile"
3
- require "fileutils"
4
-
5
- feature "testing hooks in the browser" do
6
- include Rack::Test::Methods
7
-
8
- let(:app) { Dummy::Application }
9
- let(:suites) {{
10
- "suite1" => {block: proc{ |suite| suite.hook :before, &proc{ File.write(temp_file, "") } }},
11
- "suite2" => {block: proc{ |suite| suite.hook :after, &proc{ File.write(temp_file, "") } }},
12
- "suite3" => {block: proc{ |suite| suite.hook :with_arguments, &proc{ |args| File.write(temp_file, args["message"]) } }},
13
- }}
14
-
15
- before do
16
- allow(Teaspoon.configuration).to receive(:suite_configs).and_return(suites)
17
- FileUtils.mkdir_p('tmp')
18
- File.delete(temp_file) if File.exists?(temp_file)
19
- expect(File.exists?(temp_file)).to eql(false)
20
- end
21
-
22
- after do
23
- File.delete(temp_file) if File.exists?(temp_file)
24
- end
25
-
26
- describe "requesting a before hook by name (using POST)" do
27
-
28
- let(:temp_file) { "tmp/before_hook_test" }
29
-
30
- scenario "gives me the expected results" do
31
- post("/teaspoon/suite1/before")
32
- expect(File.exists?(temp_file)).to be_truthy
33
- end
34
-
35
- end
36
-
37
- describe "requesting an after hook by name (using GET)" do
38
-
39
- let(:temp_file) { "tmp/after_hook_test" }
40
-
41
- scenario "gives me the expected results" do
42
- post("/teaspoon/suite2/after")
43
- expect(File.exists?(temp_file)).to be_truthy
44
- end
45
-
46
- end
47
-
48
- describe "requesting a before hook with arguments (using POST)" do
49
- let(:temp_file) { "tmp/before_hook_test" }
50
- let(:message) { "Hello World" }
51
- let(:params) do
52
- { args: { message: message } }
53
- end
54
-
55
- scenario "gives me the expected results" do
56
- post("/teaspoon/suite3/with_arguments", params)
57
- expect(File.open(temp_file).gets.chomp).to eq(message)
58
- end
59
- end
60
- end
@@ -1,81 +0,0 @@
1
- require "spec_helper"
2
-
3
- feature "testing with teaspoon in the browser", js: true do
4
-
5
- let(:spec_helper) { nil }
6
-
7
- before do
8
- Teaspoon::Suite.instance_variable_set(:@all, nil)
9
- allow(Teaspoon.configuration).to receive(:suite_configs).and_return "integration" => {block: proc{ |suite|
10
- suite.matcher = "spec/dummy/app/assets/javascripts/integration/*_spec.{js,js.coffee,coffee}"
11
- suite.helper = spec_helper
12
- }}
13
- end
14
-
15
- scenario "lists the suites" do
16
- visit "/teaspoon"
17
-
18
- within("#teaspoon-suite-list") do
19
- expect(page).to have_text("integration")
20
- expect(page).to have_text("integration/integration_spec.js")
21
- end
22
-
23
- end
24
-
25
- scenario "gives me the expected results" do
26
- visit "/teaspoon/integration"
27
-
28
- within("#teaspoon-progress") do
29
- expect(find("em")).to have_text("100%")
30
- end
31
-
32
- within("#teaspoon-stats") do
33
- expect(find("li:nth-child(1)")).to have_text("passes: 4")
34
- expect(find("li:nth-child(2)")).to have_text("failures: 2")
35
- expect(find("li:nth-child(3)")).to have_text("skipped: 1")
36
- end
37
-
38
- within("#teaspoon-report-failures") do
39
- expect(find("li.spec:first-child")).to have_text("Integration tests allows failing specs.")
40
- end
41
-
42
- expect(find("#spec_helper_el")).to have_text("this was generated by the spec_helper")
43
- end
44
-
45
- describe "toggle buttons" do
46
-
47
- scenario "progress toggle button toggles progress display" do
48
- visit "/teaspoon/integration?reporter=HTML"
49
-
50
- find("#teaspoon-display-progress").click
51
- expect(page).not_to have_text("100%")
52
-
53
- find("#teaspoon-display-progress").click
54
- expect(page).to have_text("100%")
55
- end
56
-
57
- end
58
-
59
- describe "using turbolinks doesn't break things" do
60
-
61
- let(:spec_helper) { "turbolinks_helper" }
62
-
63
- scenario "executes in each page navigation" do
64
- visit "/teaspoon/integration"
65
-
66
- within("#teaspoon-progress") do
67
- expect(find("em")).to have_text("100%")
68
- end
69
-
70
- within("#teaspoon-report-failures") do
71
- find("li.spec:first-child a").click
72
- end
73
-
74
- within("#teaspoon-progress") do
75
- expect(find("em")).to have_text("100%")
76
- end
77
- end
78
-
79
- end
80
-
81
- end