- Support for (webpacker)[https://github.com/rails/webpacker/].
suite.javascript_packs += ["your-custom-pack.js"]
- Fix CI
- Unfortunately disable a few tests with Ruby 3.x, they still pass with 2.x
- Adding support for multiple test suites through options #511
- fix instrumentation to support puma >= 6.2 (#600) (#601)
- Officially drops support for Ruby 2.4 and Rails earlier than 4.2.11
- make sure all tests pass with rails 4.2 - 6.1 (few pending excluded PR welcome)
- ruby supported 2.5 to 2.7 works, unknown about 3.0
- remove monkey-patch on
javascript_include_tag
- require utility in console to get Teaspoon.root (#562)
- Update ruby version requirement to allow ruby 3.0 (#583)
- Fix coverage output path (#579)
- Delay using Rails until loaded (#582)
- Run tests via Github Actions (#588)
- Add Rails 6 (beta1) support (#556)
- Allow passing selenium options (#537)
- Removes Rails 3 & 4 support (#560)
- Removes support for capybara webkit (#560)
- Fixes gem coffeescript assets being discovered by sprockets (#405)
- Many other small changes/fixes
- Adds support for Rails 5
- Fixes an ActionView version related issue.
- Changes
before_filter
tobefore_action
where possible (Rails 3 vs. Rails 5)
- Fixes an ActionView version related issue.
This was an erroneous release, of the rails_5 branch. oops.
- Fix for version check of ActionView, to expand the version checking for security/bug fix releases.
- Fix for sprockets_rails 3.0.0 change to precompile rules
- Fix teaspoon cli environment checking
- Support invalid HTML in fixtures (#387)
- Configurable JavaScript extensions via suite.js_extensions (#418)
- Fail build when Phantomjs fails (b34c4)
- Add new versions of test frameworks to the latest minor versions
- Retain file filter when navigating to specs (#327)
- Provide details when Istanbul fails (#368)
- Fix support for barebones Rails app (#372)
- Fix pending count and nested styles (#373)
- Fix total count in Jasmine 2 (#378)
- Deprecate and fix suite.use_framework= (#394)
- Fix capybara-webkit synchronization (#403)
- Fix reporting in IE8 (97cf6)
- Fix Jasmine's "fit" (f5e2a)
- Use a more robust phantomjs polyfill (#360)
- Revive support for 1.9.3 (#361)
- Fix constant scoping for Phantomjs (#359)
-
Update your Gemfile
Change your Gemfile to useteaspoon-jasmine
instead ofteaspoon
, if you're using Jasmine. If you're using Mocha, this would beteaspoon-mocha
. Useteaspoon-qunit
for QUnit.
eg: For Jasmine:gem 'teaspoon-jasmine'
For Mocha:
gem 'teaspoon-mocha'
For QUnit:
gem 'teaspoon-qunit'
If you had Teaspoon locked at a specific version, kill the version. You'll now need to reference the version of the framework, instead of the version of Teaspoon.
eg: If your Gemfile hasgem 'teaspoon', '0.9.1'
and you're using Mocha, you'll want your Gemfile to reference the latest version of Mocha:gem 'teaspoon-mocha', '2.2.4'
. The teaspoon-mocha gem contains previous versions of Mocha, so even if you're not using version 2.2.4 of Mocha in yourteaspoon_env.rb
, still reference the latest version in your Gemfile and the older version should still work. -
Configuration: Update your coverage
Inteaspoon_env.rb
, if you use Teaspoon to generate coverage reports with Istanbul, and you use thesuite.no_coverage
to exclude files from coverage, you'll need to migrate that configuration into theconfig.coverage
blocks. So if you have:suite.no_coverage += /my_file.js/
You should move this into the
coverage
block:config.coverage do |coverage| coverage.ignore += /my_file.js/ end
This means that you can no longer exclude things at the suite level. If you had multiple suites with different
no_coverage
configurations, you'll now need to create multiple coverage blocks and specify the coverage you want when using the CLI. eg: teaspoon --coverage=[coverage_name] -
Configuration: Prefer suite.use_framework over suite.javascripts
Teaspoon now has better support for framework versions. Inteaspoon_env.rb
, if you are usingsuite.javascripts
to include the testing framework, you should usesuite.use_framework
with a version number instead.If your
teaspoon_env.rb
hassuite.javascripts
configured:suite.javascripts = ["jasmine/1.3.1", "teaspoon-jasmine", "your-custom-file.js"]
This will break since
teaspoon-jasmine
no longer exists. Update this config to exclude any framework or Teaspoon files. Be sure to use+=
as Teaspoon will be modifying this array to append framework and Teaspoon files.suite.javascripts += ["your-custom-file.js"]
- Break frameworks out into individual gems (eg teaspoon-mocha)
- Frameworks (eg mocha, jasmine) can now be registered with core
- Formatters (eg dot, documentation) can now be registered with core
- Drivers (eg phantomjs, selenium) can now be registered with core
- Support for Jasmine 2.0
- Support for Mocha 2.0
- Improved abstractions around how framework events are handled (via responders)
- Can now specify framework version when installing
- Adds
rake teaspoon:info
to show Teaspoon and framework versions - Backfill support for old versions of frameworks
- Fail faster when teaspoon_env.rb cannot be found
- Lots of refactors to clean things up
- Fix files excluded from coverage for RequireJS (@davestevens)
- Fix double teaspoon hook (#332)
- Instrument files when config.expand_assets is false (#357)
- Fixes an issue where suite view was failing
- CI/Linux stability improvement (alphanumeric ordering of spec files)
- Add
expand_assets
suite configuration to control spec compilation - Provide QUnit tests with a default
equal
message - Support cli reusing running Rails server
- Add support for Capybara Webkit
- Better support for RequireJS
- Add RSpec HTML formatter
- Fix qunit 1.14.0 precompile path
- Direct support for Angular
Configuration has changed considerably, and deprecation warnings have been provided. In general it's probably best to remove your /initializers/teaspoon.rb and reinstall using the generator. Configuration is now consolidated into spec/teaspoon_env.rb. This can cause a stack level too deep exception unless the teaspoon_env.rb file properly wraps the loading of rails in a defined?(Rails)
check.
- backup your
spec/teaspoon_env.rb
file. - run the install generator to get the new
teaspoon_env.rb
. - migrate your old settings into the new file, noting the changes that might exist.
- move all settings that you had in
config/initializers/teaspoon.rb
intospec/teaspoon_env.rb
and delete the initializer.
Coverage has changed in terms of configuration, to allow for different coverage configurations, and they behave a lot like suite configurations now. You can have any number of coverage configurations and can specify which coverage configuration to use from the command line.
config.coverage do |coverage|
coverage.reports = ["text"]
end
config.coverage :CI do |coverage|
coverage.reports = ["cobertura", "lcov"]
end
config.use_coverage = :CI
The configuration around which test framework is used for a suite has been changed and improved. Instead of configuring via the javascripts
directive we're transitioning to a more complete structure with use_framework
.
You can specify version of test framework with use_framework
now, which allows for the gem to be updated, while keeping the impact on your specs minimal.
suite.use_framework :mocha, "1.10.0"
Running CI with two formatters is easier, as formatters can be sent to file output instead of just $stdout by using > in the formatter name to be used. Just remember to wrap it in a string when you specify it in the CLI -- or all output will be piped to that file.
teaspoon --format="dots,junit>/path/to/junit_output.xml"
config.formatters = ["dots", "junit>/path/to/junit_output.xml"]
Drivers have a more feature complete configuration strategy. For PhantomJS you can provide a string of flags (eg. --debug=true), and the selenium driver can accept a hash (or json string) to specify something other than firefox for instance.