aboutsummaryrefslogtreecommitdiffstats
path: root/script/load-sample-data
blob: 0521ef8497a4c6f17c4890f0fb0d111279d886c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
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."