aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-02-24 15:00:03 +0000
committerLouise Crow <louise.crow@gmail.com>2015-02-24 15:00:03 +0000
commit9261daab1db6170974e6863411b538c284b0e80b (patch)
treefb711719528c30ad2a86bc64b5dd174f34180e42
parent9f28dfc15b4203ecb3e9bce0fab41776933d8c4b (diff)
Add some info on writing theme tests.
-rw-r--r--docs/customising/themes.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/customising/themes.md b/docs/customising/themes.md
index d1bdf4147..cf426a8e2 100644
--- a/docs/customising/themes.md
+++ b/docs/customising/themes.md
@@ -235,3 +235,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>.