teaspoon 0.9.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +141 -0
- data/README.md +9 -19
- data/{vendor → app}/assets/javascripts/support/bind-poly.js +0 -0
- data/{vendor → app}/assets/javascripts/support/sinon.js +0 -0
- data/app/assets/javascripts/teaspoon-filterer.js +55 -0
- data/app/assets/javascripts/teaspoon/error.coffee +5 -0
- data/app/assets/javascripts/teaspoon/{base/fixture.coffee → fixture.coffee} +15 -15
- data/app/assets/javascripts/teaspoon/{base/hook.coffee → hook.coffee} +0 -0
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/console.coffee +18 -10
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html.coffee +43 -40
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/base_view.coffee +0 -0
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/failure_view.coffee +2 -0
- data/app/assets/javascripts/teaspoon/reporters/html/progress_view.coffee +18 -0
- data/app/assets/javascripts/teaspoon/{base/reporters/html/progress_view.coffee → reporters/html/radial_progress_view.coffee} +1 -34
- data/app/assets/javascripts/teaspoon/reporters/html/simple_progress_view.coffee +15 -0
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/spec_view.coffee +5 -3
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/suite_view.coffee +4 -2
- data/app/assets/javascripts/teaspoon/{base/reporters → reporters}/html/template.coffee +0 -0
- data/app/assets/javascripts/teaspoon/{base/runner.coffee → runner.coffee} +7 -3
- data/app/assets/javascripts/teaspoon/teaspoon.coffee +90 -32
- data/app/controllers/teaspoon/suite_controller.rb +5 -0
- data/app/views/teaspoon/suite/index.html.erb +1 -1
- data/lib/generators/teaspoon/install/install_generator.rb +67 -37
- data/lib/generators/teaspoon/install/templates/MISSING_FRAMEWORK +14 -0
- data/lib/generators/teaspoon/install/{POST_INSTALL → templates/POST_INSTALL} +0 -0
- data/lib/generators/teaspoon/install/templates/env.rb.tt +14 -0
- data/lib/generators/teaspoon/install/templates/{jasmine/env_comments.rb.tt → env_comments.rb.tt} +34 -43
- data/lib/tasks/teaspoon/info.rake +17 -0
- data/lib/teaspoon-devkit.rb +61 -0
- data/lib/teaspoon.rb +2 -0
- data/lib/teaspoon/command_line.rb +19 -14
- data/lib/teaspoon/configuration.rb +24 -35
- data/lib/teaspoon/console.rb +11 -21
- data/lib/teaspoon/coverage.rb +14 -7
- data/lib/teaspoon/deprecated.rb +22 -4
- data/lib/teaspoon/driver.rb +15 -0
- data/lib/teaspoon/driver/base.rb +7 -0
- data/lib/teaspoon/{drivers/capybara_webkit_driver.rb → driver/capybara_webkit.rb} +8 -5
- data/lib/teaspoon/{drivers/phantomjs_driver.rb → driver/phantomjs.rb} +8 -4
- data/lib/teaspoon/{drivers → driver}/phantomjs/runner.js +0 -0
- data/lib/teaspoon/{drivers/selenium_driver.rb → driver/selenium.rb} +11 -9
- data/lib/teaspoon/engine.rb +38 -25
- data/lib/teaspoon/environment.rb +24 -15
- data/lib/teaspoon/exceptions.rb +154 -41
- data/lib/teaspoon/exporter.rb +2 -2
- data/lib/teaspoon/formatter.rb +30 -0
- data/lib/teaspoon/{formatters → formatter}/base.rb +2 -36
- data/lib/teaspoon/{formatters/clean_formatter.rb → formatter/clean.rb} +4 -2
- data/lib/teaspoon/{formatters/documentation_formatter.rb → formatter/documentation.rb} +4 -3
- data/lib/teaspoon/{formatters/dot_formatter.rb → formatter/dot.rb} +4 -3
- data/lib/teaspoon/{formatters/json_formatter.rb → formatter/json.rb} +4 -2
- data/lib/teaspoon/{formatters/junit_formatter.rb → formatter/junit.rb} +3 -2
- data/lib/teaspoon/{formatters → formatter}/modules/report_module.rb +1 -1
- data/lib/teaspoon/{formatters/pride_formatter.rb → formatter/pride.rb} +4 -2
- data/lib/teaspoon/{formatters/rspec_html_formatter.rb → formatter/rspec_html.rb} +3 -2
- data/lib/teaspoon/{formatters/snowday_formatter.rb → formatter/snowday.rb} +3 -2
- data/lib/teaspoon/formatter/swayze_or_oprah.rb +111 -0
- data/lib/teaspoon/{formatters/tap_formatter.rb → formatter/tap.rb} +4 -2
- data/lib/teaspoon/{formatters/tap_y_formatter.rb → formatter/tap_y.rb} +3 -2
- data/lib/teaspoon/{formatters/teamcity_formatter.rb → formatter/teamcity.rb} +4 -2
- data/lib/teaspoon/framework.rb +17 -0
- data/lib/teaspoon/framework/base.rb +88 -0
- data/lib/teaspoon/instrumentation.rb +12 -2
- data/lib/teaspoon/registry.rb +47 -0
- data/lib/teaspoon/registry/has_default.rb +11 -0
- data/lib/teaspoon/runner.rb +6 -7
- data/lib/teaspoon/server.rb +2 -2
- data/lib/teaspoon/suite.rb +28 -30
- data/lib/teaspoon/utility.rb +5 -0
- data/lib/teaspoon/version.rb +1 -1
- metadata +52 -276
- data/app/assets/javascripts/teaspoon-jasmine.js +0 -1344
- data/app/assets/javascripts/teaspoon-mocha.js +0 -1350
- data/app/assets/javascripts/teaspoon-qunit.js +0 -1415
- data/app/assets/javascripts/teaspoon-teaspoon.js +0 -51
- data/app/assets/javascripts/teaspoon/base/teaspoon.coffee +0 -69
- data/app/assets/javascripts/teaspoon/jasmine.coffee +0 -119
- data/app/assets/javascripts/teaspoon/jasmine/reporters/html.coffee +0 -11
- data/app/assets/javascripts/teaspoon/mocha.coffee +0 -90
- data/app/assets/javascripts/teaspoon/mocha/reporters/console.coffee +0 -16
- data/app/assets/javascripts/teaspoon/mocha/reporters/html.coffee +0 -27
- data/app/assets/javascripts/teaspoon/qunit.coffee +0 -81
- data/app/assets/javascripts/teaspoon/qunit/reporters/console.coffee +0 -25
- data/app/assets/javascripts/teaspoon/qunit/reporters/html.coffee +0 -80
- data/lib/generators/teaspoon/install/templates/jasmine/env.rb +0 -11
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.coffee +0 -31
- data/lib/generators/teaspoon/install/templates/jasmine/spec_helper.js +0 -31
- data/lib/generators/teaspoon/install/templates/mocha/env.rb +0 -11
- data/lib/generators/teaspoon/install/templates/mocha/env_comments.rb.tt +0 -187
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.coffee +0 -40
- data/lib/generators/teaspoon/install/templates/mocha/spec_helper.js +0 -40
- data/lib/generators/teaspoon/install/templates/qunit/env.rb +0 -11
- data/lib/generators/teaspoon/install/templates/qunit/env_comments.rb.tt +0 -187
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.coffee +0 -29
- data/lib/generators/teaspoon/install/templates/qunit/test_helper.js +0 -30
- data/lib/teaspoon/drivers/base.rb +0 -10
- data/lib/teaspoon/formatters/description.rb +0 -36
- data/lib/teaspoon/formatters/swayze_or_oprah_formatter.rb +0 -101
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/instrumented1.coffee +0 -1
- data/spec/dummy/app/assets/javascripts/instrumented2.coffee +0 -1
- data/spec/dummy/app/assets/javascripts/integration/integration.coffee +0 -1
- data/spec/dummy/app/assets/javascripts/integration/integration_spec.coffee +0 -32
- data/spec/dummy/app/assets/javascripts/integration/spec_helper.coffee +0 -7
- data/spec/dummy/app/assets/javascripts/specs/asset_spec.js +0 -11
- data/spec/dummy/config.ru +0 -15
- data/spec/dummy/config/application.rb +0 -29
- data/spec/dummy/config/boot.rb +0 -3
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -41
- data/spec/dummy/config/environments/production.rb +0 -79
- data/spec/dummy/config/environments/test.rb +0 -42
- data/spec/dummy/config/routes.rb +0 -2
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/features/console_reporter_spec.rb +0 -62
- data/spec/features/hooks_spec.rb +0 -60
- data/spec/features/html_reporter_spec.rb +0 -81
- data/spec/features/install_generator_spec.rb +0 -54
- data/spec/features/instrumentation_spec.rb +0 -21
- data/spec/fixtures/coverage.json +0 -243
- data/spec/javascripts/fixtures/_body.html.erb +0 -1
- data/spec/javascripts/fixtures/fixture.html.haml +0 -4
- data/spec/javascripts/fixtures/fixture.json +0 -4
- data/spec/javascripts/jasmine_helper.coffee +0 -3
- data/spec/javascripts/mocha_helper.coffee +0 -4
- data/spec/javascripts/spec_helper.coffee +0 -7
- data/spec/javascripts/stylesheets/stylesheet.css.scss +0 -0
- data/spec/javascripts/support/json2.js +0 -486
- data/spec/javascripts/support/support.js.coffee +0 -0
- data/spec/javascripts/teaspoon/base/fixture_spec.coffee +0 -93
- data/spec/javascripts/teaspoon/base/reporters/console_spec.coffee +0 -162
- data/spec/javascripts/teaspoon/base/reporters/html/base_view_spec.coffee +0 -88
- data/spec/javascripts/teaspoon/base/reporters/html/failure_view_spec.coffee +0 -28
- data/spec/javascripts/teaspoon/base/reporters/html/progress_view_spec.coffee +0 -1
- data/spec/javascripts/teaspoon/base/reporters/html/spec_view_spec.coffee +0 -1
- data/spec/javascripts/teaspoon/base/reporters/html/suite_view_spec.coffee +0 -1
- data/spec/javascripts/teaspoon/base/reporters/html_spec.coffee +0 -372
- data/spec/javascripts/teaspoon/base/runner_spec.coffee +0 -58
- data/spec/javascripts/teaspoon/base/teaspoon_spec.coffee +0 -47
- data/spec/javascripts/teaspoon/jasmine/fixture_jspec.coffee +0 -13
- data/spec/javascripts/teaspoon/jasmine/models_jspec.coffee +0 -101
- data/spec/javascripts/teaspoon/jasmine/reporters/html_jspec.coffee +0 -17
- data/spec/javascripts/teaspoon/jasmine/runner_jspec.coffee +0 -59
- data/spec/javascripts/teaspoon/jasmine/spec_jspec.coffee +0 -3
- data/spec/javascripts/teaspoon/mocha/fixture_mspec.coffee +0 -12
- data/spec/javascripts/teaspoon/mocha/models_mspec.coffee +0 -93
- data/spec/javascripts/teaspoon/mocha/reporters/console_mspec.coffee +0 -24
- data/spec/javascripts/teaspoon/mocha/reporters/html_mspec.coffee +0 -41
- data/spec/javascripts/teaspoon/mocha/runner_mspec.coffee +0 -23
- data/spec/javascripts/teaspoon/mocha/spec_mspec.coffee +0 -9
- data/spec/javascripts/teaspoon/other/erb_spec.js.coffee.erb +0 -4
- data/spec/javascripts/teaspoon/phantomjs/runner_spec.coffee +0 -161
- data/spec/javascripts/turbolinks_helper.coffee +0 -2
- data/spec/spec_helper.rb +0 -25
- data/spec/support/aruba.rb +0 -15
- data/spec/teaspoon/command_line_spec.rb +0 -157
- data/spec/teaspoon/configuration_spec.rb +0 -236
- data/spec/teaspoon/console_spec.rb +0 -224
- data/spec/teaspoon/coverage_spec.rb +0 -118
- data/spec/teaspoon/drivers/base_spec.rb +0 -5
- data/spec/teaspoon/drivers/capybara_webkit_driver_spec.rb +0 -39
- data/spec/teaspoon/drivers/phantomjs_driver_spec.rb +0 -66
- data/spec/teaspoon/drivers/selenium_driver_spec.rb +0 -68
- data/spec/teaspoon/engine_spec.rb +0 -22
- data/spec/teaspoon/environment_spec.rb +0 -109
- data/spec/teaspoon/exceptions_spec.rb +0 -57
- data/spec/teaspoon/exporter_spec.rb +0 -96
- data/spec/teaspoon/formatters/base_spec.rb +0 -259
- data/spec/teaspoon/formatters/clean_formatter_spec.rb +0 -37
- data/spec/teaspoon/formatters/documentation_formatter_spec.rb +0 -127
- data/spec/teaspoon/formatters/dot_formatter_spec.rb +0 -116
- data/spec/teaspoon/formatters/json_formatter_spec.rb +0 -77
- data/spec/teaspoon/formatters/junit_formatter_spec.rb +0 -114
- data/spec/teaspoon/formatters/pride_formatter_spec.rb +0 -37
- data/spec/teaspoon/formatters/rspec_html_formatter_spec.rb +0 -107
- data/spec/teaspoon/formatters/snowday_formatter_spec.rb +0 -35
- data/spec/teaspoon/formatters/tap_formatter_spec.rb +0 -72
- data/spec/teaspoon/formatters/tap_y_formatter_spec.rb +0 -80
- data/spec/teaspoon/formatters/teamcity_formatter_spec.rb +0 -148
- data/spec/teaspoon/instrumentation_spec.rb +0 -113
- data/spec/teaspoon/result_spec.rb +0 -98
- data/spec/teaspoon/runner_spec.rb +0 -116
- data/spec/teaspoon/server_spec.rb +0 -105
- data/spec/teaspoon/suite_spec.rb +0 -138
- data/spec/teaspoon_env.rb +0 -39
- data/test/javascripts/qunit_helper.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/fixture_test.coffee +0 -10
- data/test/javascripts/teaspoon/qunit/models_test.coffee +0 -66
- data/test/javascripts/teaspoon/qunit/reporters/console_test.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/reporters/html/failure_view_test.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/reporters/html/spec_view_test.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/reporters/html/suite_view_test.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/reporters/html_test.coffee +0 -3
- data/test/javascripts/teaspoon/qunit/runner_test.coffee +0 -18
- data/vendor/assets/javascripts/jasmine/1.3.1.js +0 -2602
- data/vendor/assets/javascripts/jasmine/2.0.0.js +0 -2412
- data/vendor/assets/javascripts/jasmine/MIT.LICENSE +0 -20
- data/vendor/assets/javascripts/mocha/1.10.0.js +0 -5374
- data/vendor/assets/javascripts/mocha/1.17.1.js +0 -5813
- data/vendor/assets/javascripts/mocha/MIT.LICENSE +0 -22
- data/vendor/assets/javascripts/qunit/1.12.0.js +0 -2212
- data/vendor/assets/javascripts/qunit/1.14.0.js +0 -2288
- data/vendor/assets/javascripts/qunit/MIT.LICENSE +0 -21
- data/vendor/assets/javascripts/support/chai-1.10.0.js +0 -4800
- data/vendor/assets/javascripts/support/chai-jq-0.0.7.js +0 -524
- data/vendor/assets/javascripts/support/chai.js +0 -4782
- data/vendor/assets/javascripts/support/expect.js +0 -1284
- data/vendor/assets/javascripts/support/jasmine-jquery-1.7.0.js +0 -720
- data/vendor/assets/javascripts/support/jasmine-jquery-2.0.0.js +0 -812
- data/vendor/assets/javascripts/support/sinon-chai.js +0 -126
@@ -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 :qunit
|
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 = ["test/javascripts", "test/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 = ["test/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 specify version, 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 :qunit
|
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 = "{test/javascripts,app/assets}/**/*_test.{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 = "test_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 = ["qunit/1.14.0", "teaspoon-qunit"]
|
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,29 +0,0 @@
|
|
1
|
-
# Teaspoon includes some support files, but you can use anything from your own support path too.
|
2
|
-
# require support/sinon
|
3
|
-
# require support/your-support-file
|
4
|
-
#
|
5
|
-
# PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
|
6
|
-
# Use this polyfill to avoid the confusion.
|
7
|
-
#= require support/bind-poly
|
8
|
-
#
|
9
|
-
# You can require your own javascript files here. By default this will include everything in application, however you
|
10
|
-
# may get better load performance if you require the specific files that are being used in the test that tests them.
|
11
|
-
#= require application
|
12
|
-
#
|
13
|
-
# Deferring execution
|
14
|
-
# If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
|
15
|
-
# Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
|
16
|
-
#
|
17
|
-
# Teaspoon.defer = true
|
18
|
-
# setTimeout(Teaspoon.execute, 1000)
|
19
|
-
#
|
20
|
-
# Matching files
|
21
|
-
# By default Teaspoon will look for files that match _test.{js,js.coffee,.coffee}. Add a filename_test.js file in your
|
22
|
-
# test path and it'll be included in the default suite automatically. If you want to customize suites, check out the
|
23
|
-
# configuration in teaspoon_env.rb
|
24
|
-
#
|
25
|
-
# Manifest
|
26
|
-
# If you'd rather require your test files manually (to control order for instance) you can disable the suite matcher in
|
27
|
-
# the configuration and use this file as a manifest.
|
28
|
-
#
|
29
|
-
# For more information: http://github.com/modeset/teaspoon
|
@@ -1,30 +0,0 @@
|
|
1
|
-
// Teaspoon includes some support files, but you can use anything from your own support path too.
|
2
|
-
// require support/sinon
|
3
|
-
// require support/your-support-file
|
4
|
-
//
|
5
|
-
// PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
|
6
|
-
// Use this polyfill to avoid the confusion.
|
7
|
-
//= require support/bind-poly
|
8
|
-
//
|
9
|
-
// You can require your own javascript files here. By default this will include everything in application, however you
|
10
|
-
// may get better load performance if you require the specific files that are being used in the test that tests them.
|
11
|
-
//= require application
|
12
|
-
//
|
13
|
-
// Deferring execution
|
14
|
-
// If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
|
15
|
-
// Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
|
16
|
-
//
|
17
|
-
// Teaspoon.defer = true
|
18
|
-
// setTimeout(Teaspoon.execute, 1000)
|
19
|
-
//
|
20
|
-
// Matching files
|
21
|
-
// By default Teaspoon will look for files that match _test.{js,js.coffee,.coffee}. Add a filename_test.js file in your
|
22
|
-
// test path and it'll be included in the default suite automatically. If you want to customize suites, check out the
|
23
|
-
// configuration in teaspoon_env.rb
|
24
|
-
//
|
25
|
-
// Manifest
|
26
|
-
// If you'd rather require your test files manually (to control order for instance) you can disable the suite matcher in
|
27
|
-
// the configuration and use this file as a manifest.
|
28
|
-
//
|
29
|
-
// For more information: http://github.com/modeset/teaspoon
|
30
|
-
|
@@ -1,10 +0,0 @@
|
|
1
|
-
module Teaspoon
|
2
|
-
module Drivers
|
3
|
-
autoload :PhantomjsDriver, "teaspoon/drivers/phantomjs_driver"
|
4
|
-
autoload :SeleniumDriver, "teaspoon/drivers/selenium_driver"
|
5
|
-
autoload :CapybaraWebkitDriver, "teaspoon/drivers/capybara_webkit_driver"
|
6
|
-
|
7
|
-
class Base
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require "active_support/core_ext/string"
|
2
|
-
require "active_support/inflector"
|
3
|
-
|
4
|
-
module Teaspoon
|
5
|
-
module Formatters
|
6
|
-
class Description
|
7
|
-
attr_reader :name, :description
|
8
|
-
|
9
|
-
def initialize(name, details)
|
10
|
-
@name = name
|
11
|
-
@description = details[:description]
|
12
|
-
@default = details[:default]
|
13
|
-
end
|
14
|
-
|
15
|
-
def default?
|
16
|
-
@default
|
17
|
-
end
|
18
|
-
|
19
|
-
def cli_help
|
20
|
-
" #{name}#{' (default)' if default?} - #{description}"
|
21
|
-
end
|
22
|
-
|
23
|
-
def class_name
|
24
|
-
"#{name.to_s.camelize}Formatter"
|
25
|
-
end
|
26
|
-
|
27
|
-
def require_path
|
28
|
-
"teaspoon/formatters/#{name}_formatter"
|
29
|
-
end
|
30
|
-
|
31
|
-
def <=>(other)
|
32
|
-
name <=> other.name
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,101 +0,0 @@
|
|
1
|
-
module Teaspoon
|
2
|
-
module Formatters
|
3
|
-
class SwayzeOrOprahFormatter < Base
|
4
|
-
protected
|
5
|
-
|
6
|
-
def log_result(_result)
|
7
|
-
return log_str("\nNo quote for you.") if failures.size > 0
|
8
|
-
names, quote = random_quote
|
9
|
-
log_line("\n#{quote.inspect} -- Oprah Winfrey or Patrick Swayze?")
|
10
|
-
log_str("Will your run be successful? [swayze or oprah]: ")
|
11
|
-
if names.include?(gets.chomp)
|
12
|
-
log_line("\nYou got it right!\n")
|
13
|
-
else
|
14
|
-
log_line("\nWrong, too bad!\n")
|
15
|
-
raise the roof, YO && "Let's get busy"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
DATA = [
|
22
|
-
{
|
23
|
-
author: ["patrick swayze", "patrick", "swayze", "ps", "p"],
|
24
|
-
quotes: [
|
25
|
-
"When those you love die, the best you can do is honor their spirit for as long as you live. You make a commitment that you're going to take whatever lesson that person or animal was trying to teach you, and you make it true in your own life... it's a positive way to keep their spirit alive in the world, by keeping it alive in yourself.",
|
26
|
-
"The way to screw up somebody's life is to give them what they want.",
|
27
|
-
"There's just something about dance ... It's like a primal thing in all of us.",
|
28
|
-
"Pain don't hurt.",
|
29
|
-
"What winning is to me is not giving up, is no matter what's thrown at me, I can take it. And I can keep going.",
|
30
|
-
"Good-looking people turn me off. Myself included.",
|
31
|
-
"One thing I'm not going to do is chase staying alive. You spend so much time chasing staying alive, you won't live.",
|
32
|
-
"The way to screw up somebody's life is to give them what they want.",
|
33
|
-
"There's just something about dance. It's like a primal thing in all of us.",
|
34
|
-
"As always, I appreciate all the love and support people have sent and continue to send my way.",
|
35
|
-
"Everything is designed to help you sell out.",
|
36
|
-
"How do you nurture a positive attitude when all the statistics say you're a dead man? You go to work.",
|
37
|
-
"I am very, very clear on how difficult it is for a young kid out there to go into the arts without taking a lot of heat from his peers.",
|
38
|
-
"I don't know how many hills and valleys I've had, how many times I've had to refocus my world and my life and my career.",
|
39
|
-
"I don't know what's on the other side.",
|
40
|
-
"I don't want to be a poster child for cancer.",
|
41
|
-
"I don't want to be Mr. Romantic Leading Man. I don't want to be the Dance Dude. I don't want to be the Action Guy. If I had to do any one of those all my life, it'd drive me crazy.",
|
42
|
-
"I dropped about 20 pounds in the blink of an eye. And then when you see it in the mirror, when all of a sudden you pull your eyes down, and the bottom of your eyes go yellow and jaundice sets in - then you know something's wrong.",
|
43
|
-
"I got completely fed up with that Hollywood blockbuster mentality. I couldn't take it seriously any longer.",
|
44
|
-
"I had a lot of anger because I wasn't happy with the way I had been raised.",
|
45
|
-
"I just love to work hard.",
|
46
|
-
"I keep dreaming of a future, a future with a long and healthy life, not lived in the shadow of cancer but in the light.",
|
47
|
-
"I keep my heart and my soul and my spirit open to miracles.",
|
48
|
-
"I like to believe that I've got a lot of guardian warriors sittin' on my shoulder including my dad.",
|
49
|
-
"I took after my father.",
|
50
|
-
"I wanna live.",
|
51
|
-
"I will go so far as to say probably smoking had something to do with my pancreatic cancer.",
|
52
|
-
"I'm trying to shut up and let my angels speak to me and tell me what I'm supposed to do.",
|
53
|
-
"I've had so many injuries.",
|
54
|
-
]
|
55
|
-
},
|
56
|
-
|
57
|
-
{
|
58
|
-
author: ["oprah winfrey", "oprah", "winfrey", "ow", "o"],
|
59
|
-
quotes: [
|
60
|
-
"Lots of people want to ride with you in the limo, but what you want is someone who will take the bus with you when the limo breaks down.",
|
61
|
-
"Be thankful for what you have; you'll end up having more. If you concentrate on what you don't have, you will never, ever have enough.",
|
62
|
-
"The more you praise and celebrate your life, the more there is in life to celebrate.",
|
63
|
-
"Surround yourself with only people who are going to lift you higher.",
|
64
|
-
"Breathe. Let go. And remind yourself that this very moment is the only one you know you have for sure.",
|
65
|
-
"As you become more clear about who you really are, you'll be better able to decide what is best for you - the first time around.",
|
66
|
-
"It isn't until you come to a spiritual understanding of who you are - not necessarily a religious feeling, but deep down, the spirit within - that you can begin to take control.",
|
67
|
-
"I am a woman in process. I'm just trying like everybody else. I try to take every conflict, every experience, and learn from it. Life is never dull.",
|
68
|
-
"Turn your wounds into wisdom.",
|
69
|
-
"Doing the best at this moment puts you in the best place for the next moment.",
|
70
|
-
"Where there is no struggle, there is no strength.",
|
71
|
-
"Do the one thing you think you cannot do. Fail at it. Try again. Do better the second time. The only people who never tumble are those who never mount the high wire. This is your moment. Own it.",
|
72
|
-
"Passion is energy. Feel the power that comes from focusing on what excites you.",
|
73
|
-
"I don't think of myself as a poor deprived ghetto girl who made good. I think of myself as somebody who from an early age knew I was responsible for myself, and I had to make good.",
|
74
|
-
"Think like a queen. A queen is not afraid to fail. Failure is another steppingstone to greatness.",
|
75
|
-
"I believe that every single event in life happens in an opportunity to choose love over fear.",
|
76
|
-
"The greatest discovery of all time is that a person can change his future by merely changing his attitude.",
|
77
|
-
"I don't believe in failure. It is not failure if you enjoyed the process.",
|
78
|
-
"I don't think you ever stop giving. I really don't. I think it's an on-going process. And it's not just about being able to write a check. It's being able to touch somebody's life.",
|
79
|
-
"The struggle of my life created empathy - I could relate to pain, being abandoned, having people not love me.",
|
80
|
-
"What material success does is provide you with the ability to concentrate on other things that really matter. And that is being able to make a difference, not only in your own life, but in other people's lives.",
|
81
|
-
"Books were my pass to personal freedom. I learned to read at age three, and soon discovered there was a whole world to conquer that went beyond our farm in Mississippi.",
|
82
|
-
"Biology is the least of what makes someone a mother.",
|
83
|
-
"Real integrity is doing the right thing, knowing that nobody's going to know whether you did it or not.",
|
84
|
-
"I have a lot of things to prove to myself. One is that I can live my life fearlessly."
|
85
|
-
]
|
86
|
-
}
|
87
|
-
]
|
88
|
-
|
89
|
-
def random_quote
|
90
|
-
set = DATA[rand(DATA.size)]
|
91
|
-
[set[:author], set[:quotes][rand(set[:quotes].size)]]
|
92
|
-
end
|
93
|
-
|
94
|
-
def the(*_); Exception.new("poorly answered question"); end
|
95
|
-
|
96
|
-
def roof; 0; end
|
97
|
-
|
98
|
-
YO = 0
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
data/spec/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
-
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
@@ -1 +0,0 @@
|
|
1
|
-
instrumented1 = -> 'foo'
|
@@ -1 +0,0 @@
|
|
1
|
-
instrumented2 = -> 'foo'
|
@@ -1 +0,0 @@
|
|
1
|
-
integration = -> 'foo'
|
@@ -1,32 +0,0 @@
|
|
1
|
-
#= require integration/integration
|
2
|
-
#= require integration/spec_helper
|
3
|
-
|
4
|
-
describe "Integration tests", ->
|
5
|
-
|
6
|
-
it "tests", ->
|
7
|
-
console.log("testing console output")
|
8
|
-
expect(true).toBe(true)
|
9
|
-
|
10
|
-
it "handles multiple specs", ->
|
11
|
-
expect(true).toBe(true)
|
12
|
-
|
13
|
-
it "allows failing specs", ->
|
14
|
-
expect(true).toBe(false)
|
15
|
-
|
16
|
-
it "allows erroring specs", ->
|
17
|
-
foo()
|
18
|
-
|
19
|
-
describe "nesting", ->
|
20
|
-
|
21
|
-
it "is allowed", ->
|
22
|
-
expect(true).toBe(true)
|
23
|
-
|
24
|
-
describe "pending", ->
|
25
|
-
|
26
|
-
it "is allowed"
|
27
|
-
|
28
|
-
describe "fixtures", ->
|
29
|
-
|
30
|
-
it "loads files", ->
|
31
|
-
fixture.load("fixture.html")
|
32
|
-
expect(fixture.el.innerHTML).toContain("Lorem ipsum dolor")
|