aboutsummaryrefslogtreecommitdiffstats
path: root/script/load-sample-data
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2011-08-09 21:09:10 +0100
committerRobin Houston <robin.houston@gmail.com>2011-08-09 21:09:10 +0100
commit7d1eb5df0c1bcc6a7a92755004faf85bc00496d4 (patch)
tree6f2cda5408b633662b865c1bc435cbb63b110ac8 /script/load-sample-data
parentb6860bea9d4569a52801d72734fa86849c232721 (diff)
parente6fda87211f3c525c17b0d8a2c039192a6c18bb6 (diff)
Merge branch 'master' into wdtk
Diffstat (limited to 'script/load-sample-data')
-rwxr-xr-xscript/load-sample-data12
1 files changed, 12 insertions, 0 deletions
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