diff options
author | Francis Irving <francis@mysociety.org> | 2010-07-13 23:54:46 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-07-13 23:54:46 +0100 |
commit | 59395b3bdf19aed7bf5f77656afa6c31dad7e138 (patch) | |
tree | b6e4c9f9e5b4a9f792a550ce3af727ae32b1cba1 /spec/spec_helper.rb | |
parent | 452ac41f05f655a9fd23c8df4796f26632c23050 (diff) | |
parent | da2c0aaf5f0d07baa3a355033a92d5dd295f2f13 (diff) |
Merge branch 'master' into francis-profile-photo
Conflicts:
app/views/user/show.rhtml
commonlib
spec/controllers/user_controller_spec.rb
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 005ae8174..ddb9ab14b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,7 +7,7 @@ require 'spec/rails' Spec::Runner.configure do |config| config.use_transactional_fixtures = true config.use_instantiated_fixtures = false - config.fixture_path = RAILS_ROOT + '/spec/fixtures' + config.fixture_path = RAILS_ROOT + '/spec/fixtures/' # You can declare fixtures for each behaviour like this: # describe "...." do @@ -38,10 +38,18 @@ 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 + verbose = false + ActsAsXapian.update_index(flush_to_disk=true, verbose) +end + # Validate an entire HTML page def validate_html(html) $tempfilecount = $tempfilecount + 1 |