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:
parent
08b49ec9db
commit
770402d912
|
@ -33,6 +33,7 @@ class TestRelatedPosts < Test::Unit::TestCase
|
||||||
require 'classifier'
|
require 'classifier'
|
||||||
any_instance_of(::Classifier::LSI) do |c|
|
any_instance_of(::Classifier::LSI) do |c|
|
||||||
stub(c).find_related { @site.posts[-1..-9] }
|
stub(c).find_related { @site.posts[-1..-9] }
|
||||||
|
stub(c).build_index
|
||||||
end
|
end
|
||||||
assert_equal @site.posts[-1..-9], Jekyll::RelatedPosts.new(@site.posts.last).build
|
assert_equal @site.posts[-1..-9], Jekyll::RelatedPosts.new(@site.posts.last).build
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue