aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2009-12-07 22:23:12 +0000
committerFrancis Irving <francis@mysociety.org>2009-12-07 22:23:12 +0000
commit2dc770e026c4523561780b433ce189728890863c (patch)
tree8b124113098b4823031afa8b4d76295f999b82d4 /spec/spec_helper.rb
parentaf9c4ee5daaef5dcc0c2bd220b0d60307460b2a1 (diff)
Test case for search where a user name is substring of another
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2b1fbac53..72457815a 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -38,13 +38,16 @@ def load_file_fixture(file_name)
end
def rebuild_xapian_index
+ # XXX could for speed call ActsAsXapian.rebuild_index directly, but would
+ # need model name list, and would need to fix acts_as_xapian so can call writes
+ # and reads mixed up (it asserts where it thinks it can't do this)
rebuild_name = File.dirname(__FILE__) + '/../script/rebuild-xapian-index'
Kernel.system(rebuild_name) or raise "failed to launch #{rebuild_name}, error bitcode #{$?}, exit status: #{$?.exitstatus}"
end
def update_xapian_index
- update_name = File.dirname(__FILE__) + '/../script/update-xapian-index'
- Kernel.system(update_name) or raise "failed to launch #{update_name}, error bitcode #{$?}, exit status: #{$?.exitstatus}"
+ verbose = false
+ ActsAsXapian.update_index(flush_to_disk=true, verbose)
end
# Validate an entire HTML page