Some tests of the JS API are implemented in QUnit.
- You can reach individual test pages directly at
host:3000/tests_name
- Whole suite via
rspec spec/system/js/q_unit_spec.rb
- Single file via
QUNIT_TEST=name rspec spec/system/js/q_unit_spec.rb
Opening directly depends on browser settings for timezone and locale. Running via rspec sets timezone and locale.
- Mandatory:
name.js
file in public/assets/tests/qunit/ - Optional:
name.html.erb
file app/views/tests/
- Defaults to
app/views/tests/show.html.erb
form_*
tests default toapp/views/tests/form.html.erb
- Picks
name.html.erb