Commit d403739f by tady

upgrade teaspoon

parent 8022da91
Teaspoon.setup do |config|
# This determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
# http://localhost:3000/jasmine to run your specs.
config.mount_at = "/teaspoon"
# This defaults to Rails.root if left nil. If you're testing an engine using a dummy application it can be useful to
# set this to your engines root.. E.g. `Teaspoon::Engine.root`
config.root = nil
# These paths are appended to the Rails assets paths (relative to config.root), and by default is an array that you
# can replace or add to.
config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
# Fixtures are rendered through a standard controller. This means you can use things like HAML or RABL/JBuilder, etc.
# to generate fixtures within this path.
config.fixture_path = "spec/javascripts/fixtures"
# You can modify the default suite configuration and create new suites here. Suites can be isolated from one another.
# When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
# omit various directives and the defaults will be used.
#
# To run a specific suite
# - in the browser: http://localhost/teaspoon/[suite_name]
# - from the command line: rake teaspoon suite=[suite_name]
config.suite do |suite|
# You can specify a file matcher and all matching files will be loaded when the suite is run. It's important that
# these files are serve-able from sprockets.
#
# Note: Can also be set to nil.
suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
# Each suite can load a different helper, which can in turn require additional files. This file is loaded before
# your specs are loaded, and can be used as a manifest.
suite.helper = "spec_helper"
# These are the core Teaspoon javascripts. It's strongly encouraged to include only the base files here. You can
# require other support libraries in your spec helper, which allows you to change them without having to restart the
# server.
#
# Available frameworks: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit
#
# Note: To use the CoffeeScript source files use `"teaspoon/jasmine"` etc.
suite.javascripts = ["teaspoon-jasmine"]
# If you want to change how Teaspoon looks, or include your own stylesheets you can do that here. The default is the
# stylesheet for the HTML reporter.
suite.stylesheets = ["teaspoon"]
# When running coverage reports, you probably want to exclude libraries that you're not testing.
# Accepts an array of filenames or regular expressions. The default is to exclude assets from vendors or gems.
suite.no_coverage = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
# suite.no_coverage << "jquery.min.js" # excludes jquery from coverage reports
end
# Example suite. Since we're just filtering to files already within the root spec/javascripts, these files will also
# be run in the default suite -- but can be focused into a more specific suite.
#config.suite :targeted do |suite|
# suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
#end
end if defined?(Teaspoon) && Teaspoon.respond_to?(:setup) # let Teaspoon be undefined outside of development/test/asset groups
# Teaspoon includes some support files, but you can use anything from your own support path too. # Teaspoon includes some support files, but you can use anything from your own support path too.
# require support/jasmine-jquery-1.7.0 # require support/expect
# require support/jasmine-jquery-2.0.0
# require support/sinon # require support/sinon
# require support/chai
# require support/your-support-file # require support/your-support-file
# #
# PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion. # PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
...@@ -26,6 +26,14 @@ ...@@ -26,6 +26,14 @@
# #
# For more information: http://github.com/modeset/teaspoon # For more information: http://github.com/modeset/teaspoon
# #
# Chai
# If you're using Chai, you'll probably want to initialize your preferred assertion style. You can read more about Chai
# at: http://chaijs.com/guide/styles
#
# window.assert = chai.assert
# window.expect = chai.expect
# window.should = chai.should()
#
# You can require your own javascript files here. By default this will include everything in application, however you # You can require your own javascript files here. By default this will include everything in application, however you
# may get better load performance if you require the specific files that are being used in the spec that tests them. # may get better load performance if you require the specific files that are being used in the spec that tests them.
#= require application #= require application
...@@ -42,7 +42,7 @@ Teaspoon.configure do |config| ...@@ -42,7 +42,7 @@ Teaspoon.configure do |config|
# Note: If no version is specified, the latest is assumed. # Note: If no version is specified, the latest is assumed.
# #
# Available: jasmine[1.3.1, 2.0.0], mocha[1.10.0, 1.17.1] qunit[1.12.0, 1.14.0] # Available: jasmine[1.3.1, 2.0.0], mocha[1.10.0, 1.17.1] qunit[1.12.0, 1.14.0]
suite.use_framework :jasmine, "1.3.1" suite.use_framework :mocha
# Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
# files need to be within an asset path. You can add asset paths using the `config.asset_paths`. # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
...@@ -57,7 +57,7 @@ Teaspoon.configure do |config| ...@@ -57,7 +57,7 @@ Teaspoon.configure do |config|
# Note: For CoffeeScript files use `"teaspoon/jasmine"` etc. # Note: For CoffeeScript files use `"teaspoon/jasmine"` etc.
# #
# Available: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit # Available: teaspoon-jasmine, teaspoon-mocha, teaspoon-qunit
#suite.javascripts = ["jasmine/1.3.1", "teaspoon-jasmine"] #suite.javascripts = ["mocha/1.17.1", "teaspoon-mocha"]
# You can include your own stylesheets if you want to change how Teaspoon looks. # You can include your own stylesheets if you want to change how Teaspoon looks.
# Note: Spec related CSS can and should be loaded using fixtures. # Note: Spec related CSS can and should be loaded using fixtures.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment