From f5e5b605bac9e80f7556b666643eec25b6987545 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Tue, 2 Aug 2011 15:29:30 +0100 Subject: Update sample-data loading instructions to use a script (because we need to workaround fixtures not knowing how to load data from the filesystem for RawEmails) --- script/load-sample-data | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 script/load-sample-data (limited to 'script/load-sample-data') 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 -- cgit v1.2.3