From 770402d91269a4e6271582bbef98bd762fc8e260 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Wed, 8 May 2013 22:33:20 -0500 Subject: [PATCH] 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. --- test/test_related_posts.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_related_posts.rb b/test/test_related_posts.rb index cff43362..98833f2f 100644 --- a/test/test_related_posts.rb +++ b/test/test_related_posts.rb @@ -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