aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/xapian_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-08-20 09:51:18 +0100
committerLouise Crow <louise.crow@gmail.com>2013-08-20 09:51:18 +0100
commit3d12cbe6ee7ff49dad9a473efc0792b2a4f4cba6 (patch)
tree1c43d3a004293f442f61b0e64847a4ef16cacd2a /spec/models/xapian_spec.rb
parentc449240a1b1cddebb53e9748b15be43c0f65c463 (diff)
parent4b95ccffc468c256d6ba6248303dd2b78bf5896a (diff)
Merge branch 'release/0.13' into wdtk
Conflicts: locale/he_IL/app.po locale/hr_HR/app.po locale/nb_NO/app.po locale/uk/app.po
Diffstat (limited to 'spec/models/xapian_spec.rb')
-rw-r--r--spec/models/xapian_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb
index c40334142..7aab9cdc6 100644
--- a/spec/models/xapian_spec.rb
+++ b/spec/models/xapian_spec.rb
@@ -373,6 +373,11 @@ end
# I would expect ActsAsXapian to have some tests under vendor/plugins/acts_as_xapian, but
# it looks like this is not the case. Putting a test here instead.
describe ActsAsXapian::Search, "#words_to_highlight" do
+ before(:each) do
+ load_raw_emails_data
+ get_fixtures_xapian_index
+ end
+
it "should return a list of words used in the search" do
s = ActsAsXapian::Search.new([PublicBody], "albatross words", :limit => 100)
s.words_to_highlight.should == ["albatross", "words"]