aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2012-01-06 18:54:37 +0100
committerDavid Cabo <david@calibea.com>2012-01-06 18:54:37 +0100
commitd4f3ca2a2f7cc68663a9ca005cf379533032d232 (patch)
treef6d2a07fd1e4f8e1091d5df765b68140db5e47ca /spec/spec_helper.rb
parent7ed887f0989425d9e412890800df05637b08c025 (diff)
parent766d696d5b914520b0b9367e9b9a9decab87ea5f (diff)
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 5c5cd9a7f..29ce6bca5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -78,7 +78,6 @@ def load_file_fixture(file_name)
end
def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = true)
- parse_all_incoming_messages
if dropfirst
begin
ActsAsXapian.readable_init
@@ -86,7 +85,9 @@ def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst =
rescue RuntimeError
end
ActsAsXapian.writable_init
+ ActsAsXapian.writable_db.close
end
+ parse_all_incoming_messages
verbose = false
# safe_rebuild=true, which involves forking to avoid memory leaks, doesn't work well with rspec.
# unsafe is significantly faster, and we can afford possible memory leaks while testing.
@@ -96,7 +97,7 @@ end
def update_xapian_index
verbose = false
- ActsAsXapian.update_index(flush_to_disk=true, verbose)
+ ActsAsXapian.update_index(flush_to_disk=false, verbose)
end
# Validate an entire HTML page