aboutsummaryrefslogtreecommitdiffstats
path: root/script/load-sample-data
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-08-12 13:12:50 +0200
committerDavid Cabo <david@calibea.com>2011-08-12 13:12:50 +0200
commitdf1754847892bb6abce2681a42d8c50cf8d3a2da (patch)
tree73c518103906ad446cedd55c69690d8d91f0f362 /script/load-sample-data
parenta63e598b9e0ddfa7ac695b1be41aaace6c0eb628 (diff)
parent766df1c7de8f820bd6e451526787632a136bc635 (diff)
Merge branch 'master' of github.com:sebbacon/alaveteli into asktheeu
Conflicts: locale/cy/app.po locale/de/app.po locale/es/app.po locale/fr/app.po locale/sq/app.po locale/sr/app.po locale/sr@latin/app.po
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