diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-02-24 15:00:03 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-02-24 15:03:43 +0000 |
commit | 34decc8388c183515294cca9e4a46bd3f7d80d2f (patch) | |
tree | f070c7a7168cec9b44f0d3e9386a60a58c980cf7 /docs/customising/themes.md | |
parent | 06223ef9c34305b5640c4df73b260cd370722f4a (diff) |
Add some info on writing theme tests.
Diffstat (limited to 'docs/customising/themes.md')
-rw-r--r-- | docs/customising/themes.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/customising/themes.md b/docs/customising/themes.md index a51ed447e..abef85dd0 100644 --- a/docs/customising/themes.md +++ b/docs/customising/themes.md @@ -194,3 +194,14 @@ If you need to extend the behaviour of Alaveteli at the controller or model leve ## Working with themes You can use [`script/switch-theme.rb`](https://github.com/mysociety/alaveteli/blob/master/script/switch-theme.rb) to set the current theme if you are working with multiple themes. This might be useful for switching between the default `alavetelitheme` and your own fork. + +## Testing your theme + +You can add tests for the changes in functionality that are implemented +in your theme. These use <a href="http://rspec.info/">rspec</a>, as does the main Alaveteli test suite. +They should be put in the `spec` directory of your theme. They are run +separately from the main Alaveteli tests by executing the following command in the directory in which Alaveteli is installed (substituting your theme directory for `alavetelitheme`): + + bundle exec rspec lib/themes/alavetelitheme/spec + +You can see some example tests in the <a href="https://github.com/mysociety/whatdotheyknow-theme/tree/master/spec">whatdotheyknow-theme</a>. |