Generate all HAML fixtures within 'teaspoon:fixtures' task
Due to multiple long standing issues with the Teaspoon test runner we've made the decision to migrate to a javascript-based frontend test runner called Karma. It is more actively maintained and flexible for our needs.
Since Karma does not require the ruby environment to be running concurrently we'll need to have all of our fixtures pre-generated before it runs. @winniehell has already started the process of migrating dynamically generated templates into a pre-compile step in !6059 (merged) and there is an outstanding meta issue to generate all of our fixtures this way in the future #24753 (moved).
This is not meant to replace #24753 (moved). It merely proposes an intermediate solution to migrate all fixtures into the rake teaspoon:fixtures
step, including those which have not yet been updated. This will allow for the eventual transition to Karma to not depend on #24753 (moved).
Steps:
- Create a catch-all fixture compiler at
spec/javascripts/fixtures/static_fixtures.rb
which takes all*.html.haml
fixtures in the directory and turns them into*.html.raw
files - Update all javascript tests to use these new filenames