Also stub the building of the index

Since we don't actually use the index in getting the related posts from
the tests there's no need to build an index, which can take a long time
if the ruby bindings for the GSL library are not installed.
This commit is contained in:
Matt Rogers 2013-05-08 22:33:20 -05:00
parent 08b49ec9db
commit 770402d912
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class TestRelatedPosts < Test::Unit::TestCase
require 'classifier'
any_instance_of(::Classifier::LSI) do |c|
stub(c).find_related { @site.posts[-1..-9] }
stub(c).build_index
end
assert_equal @site.posts[-1..-9], Jekyll::RelatedPosts.new(@site.posts.last).build
end