From 34decc8388c183515294cca9e4a46bd3f7d80d2f Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 24 Feb 2015 15:00:03 +0000 Subject: Add some info on writing theme tests. --- docs/customising/themes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/customising') 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 rspec, 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 whatdotheyknow-theme. -- cgit v1.2.3