alphagov/whitehall — pull request #1784 by vinayvinay (2014-10-16 11:39:54+00:00)
Title: Compile mustache templates before running JS features

cucumber features tagged `@javascript` require mustache templates to be compiled, or else a javascript error for `undefined variable: templates` occurs. there is not indication that the mustache templates not being compiled is the reason for such failures. this change prints a helpful error message to indicate the reason for failure.

```sh
$ bundle exec cucumber features/filtering-documents.feature
Using the default profile...
.........
ERROR: Scenarios tagged @javascript require mustache templates to be compiled first. Execute 'rake shared_mustache:compile' before running these scenarios.
F----.........F----

Failing Scenarios:
cucumber features/filtering-documents.feature:50 # Scenario: Filtering publications in a javascript-enabled browser
cucumber features/filtering-documents.feature:70 # Scenario: User filters by "Statistics" which returns statistics and national statistics
```