Commit Graph

18 Commits

Author SHA1 Message Date
Ashwin Maroli 9adac3a11e Fix Rubocop offences in test files (#7128)
Merge pull request 7128
2018-07-12 10:21:23 -04:00
Parker Moore 7cf5f51ca2 Enforce Style/FrozenStringLiteralComment. (#6265)
Merge pull request 6265
2017-08-03 21:27:32 -04:00
Pat Hawks 1d885911bc
Rubocop: Require consistent comma in multiline literals 2017-01-12 17:52:29 -06:00
Pat Hawks 3bfdc00d14
Appease Rubocop 2016-09-19 13:15:02 -05:00
XhmikosR dbc0349909 tests: Typo fixes. 2016-07-18 21:20:47 +03:00
Brint O'Hearn 8f07affe2a Rubocop fixes for test/test_related_posts.rb 2016-05-20 21:23:29 -05:00
Parker Moore b89f943bf2 collections: posts as collection 2015-10-26 00:29:14 -07:00
Jordon Bedwell f054bae503 Add support for JRuby, it was easier than assumed. 2015-05-15 07:10:22 -05:00
Justin Weiss fa435fae94 Use `Jekyll::Post`s for both LSI indexing and lookup.
When looking for related posts, Jekyll was indexing `Jekyll::Post`
objects, but finding related posts based on `Jekyll::Post#content`. This
caused two problems:

1. Ruby 2.2 will warn on == if <=> throws an exception (and future Ruby
versions will surface that exception). Because `String`s can't be
compared with `Jekyll::Post`s, this warning was appearing all the time
while searching for related posts.

2. LSI won't return a post itself when searching for related posts. But
LSI could never tell that we were searching on a post, since Jekyll
passed post content, not a post object. With this fix, we can remove the
`- [post]` from `Jekyll::RelatedPosts#find_related`.

This is a more accurate fix for #3484.
2015-03-29 23:43:55 -07:00
Arthur Neves 67ba8ad0cb Use rspec-mock instead of rr 2015-03-06 20:13:07 -05:00
Parker Moore 7ad0597bff Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
Parker Moore 4b59eb4175 Fix the test inheritance for the tests. 2015-02-20 13:35:02 -08:00
Parker Moore 4d8e335da1 The mighty classifier --- reborn!!!!!
Use classifier-reborn v2.0 in place of classifier 1.3.
Code at https://github.com/jekyll/classifier-reborn
2014-08-13 00:29:40 -04:00
maul.esel 87de8ddeb4 fix test muting to work for Ruby > 1.9 2013-09-12 13:26:32 +02:00
maul.esel 0afe79d1cb mute LSI output in tests 2013-09-11 18:00:28 +02:00
Anand Narayan dfca2c6edc Latest post is chosen first in related posts 2013-07-06 15:11:52 +05:30
Matt Rogers 770402d912 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.
2013-05-08 22:33:20 -05:00
Matt Rogers 1aa49fa734 Wrap tests around Jekyll::RelatedPosts
This gives me more confidence that we're doing the right things when it
comes to both the LSI and non-LSI cases and prevents regressions.
2013-05-08 21:57:10 -05:00