aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/INSTALL.md2
-rwxr-xr-xscript/load-sample-data12
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
index e6f7caec7..eb0a77dd9 100644
--- a/doc/INSTALL.md
+++ b/doc/INSTALL.md
@@ -110,7 +110,7 @@ If you want some dummy data to play with, you can try loading the
fixtures that the test suite uses into your development database. You
can do this with:
- rake spec:db:fixtures:load
+ ./script/load-sample-data
Next we need to create the index for the search engine (Xapian):
diff --git a/script/load-sample-data b/script/load-sample-data
new file mode 100755
index 000000000..0521ef849
--- /dev/null
+++ b/script/load-sample-data
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# This script loads spec fixtures, but also needs to do a hack around
+# the fact that the fixtures aren't aware of the fact that RawEmails
+# have a filesystem representation of their contents
+
+LOC=`dirname $0`
+rake --silent spec:db:fixtures:load
+"$LOC/runner" 'puts File.expand_path(File.dirname(__FILE__) + "/spec/spec_helper"); require File.expand_path(File.dirname(__FILE__) + "/spec/spec_helper"); RawEmail.all().each {|email| email.data = load_file_fixture("useless_raw_email.email")}'
+
+
+echo "Loaded fixtures." \ No newline at end of file