diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-21 18:51:05 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-21 18:51:05 +0000 |
commit | 640aa149fd321658a33466df7b53947b78bccd81 (patch) | |
tree | 502d2c316d9c9addd509f4ae6f3d47a96173ceca /spec/models/xapian_spec.rb | |
parent | ffbd12d868eb1803631194b5b4e4ffbb3ac0d812 (diff) |
Use new function that copies existing xapian index in spec setup where a clean copy of the xapian index with fixtures loaded is required.
Diffstat (limited to 'spec/models/xapian_spec.rb')
-rw-r--r-- | spec/models/xapian_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb index 195b39eee..8c99d550f 100644 --- a/spec/models/xapian_spec.rb +++ b/spec/models/xapian_spec.rb @@ -4,9 +4,9 @@ describe User, " when indexing users with Xapian" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end - + it "should search by name" do # def InfoRequest.full_search(models, query, order, ascending, collapse, per_page, page) xapian_object = InfoRequest.full_search([User], "Silly", 'created_at', true, nil, 100, 1) @@ -21,7 +21,7 @@ describe User, " when indexing users with Xapian" do xapian_object = InfoRequest.full_search([User], "stuff", 'created_at', true, nil, 100, 1) xapian_object.results.size.should == 1 xapian_object.results[0][:model].should == user - + user.about_me = "I am really an aardvark, true story." user.save! update_xapian_index @@ -38,7 +38,7 @@ end describe PublicBody, " when indexing public bodies with Xapian" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should search index the main name field" do @@ -71,7 +71,7 @@ describe PublicBody, " when indexing requests by body they are to" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find requests to the body" do @@ -126,7 +126,7 @@ end describe User, " when indexing requests by user they are from" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find requests from the user" do @@ -204,7 +204,7 @@ end describe User, " when indexing comments by user they are by" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find requests from the user" do @@ -239,7 +239,7 @@ end describe InfoRequest, " when indexing requests by their title" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find events for the request" do @@ -268,7 +268,7 @@ end describe InfoRequest, " when indexing requests by tag" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find request by tag, even when changes" do @@ -289,7 +289,7 @@ end describe PublicBody, " when indexing authorities by tag" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should find request by tag, even when changes" do @@ -313,7 +313,7 @@ end describe PublicBody, " when only indexing selected things on a rebuild" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should only index what we ask it to" do |