diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-29 13:34:39 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-29 14:44:43 +0100 |
commit | 0c8dda3796353f04a1d335b7948a2c5be8094568 (patch) | |
tree | 9f033c6f9cd23fb42514bfd40677c4764abbaba7 /spec/lib | |
parent | 52bc4b39a34af00296637e996d199a5c3f1724bf (diff) |
Go back to setting up xapian index with fixtures
Skipping this seems to have some unexpected interaction with
fixture data.
https://travis-ci.org/mysociety/alaveteli/jobs/64446161
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/acts_as_xapian_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/lib/acts_as_xapian_spec.rb b/spec/lib/acts_as_xapian_spec.rb index 1d9256441..9e4383b8e 100644 --- a/spec/lib/acts_as_xapian_spec.rb +++ b/spec/lib/acts_as_xapian_spec.rb @@ -6,14 +6,15 @@ describe ActsAsXapian::Search do describe "#words_to_highlight" do before :all do + get_fixtures_xapian_index # make sure an index exists @alice = FactoryGirl.create(:public_body, :name => 'alice') - ActsAsXapian.update_index + update_xapian_index end after :all do @alice.destroy - ActsAsXapian.update_index + update_xapian_index end it "should return a list of words used in the search" do @@ -81,15 +82,16 @@ describe ActsAsXapian::Search do describe :spelling_correction do before :all do + get_fixtures_xapian_index @alice = FactoryGirl.create(:public_body, :name => 'alice') @bob = FactoryGirl.create(:public_body, :name => 'bôbby') - ActsAsXapian.update_index + update_xapian_index end after :all do @alice.destroy @bob.destroy - ActsAsXapian.update_index + update_xapian_index end it 'returns a UTF-8 encoded string' do |