Closed radoslavkarlik closed 4 years ago
Thank you so much! The code looks great. Let's get a quick test in here.
In spec/jekyll_redirect_from/generator_spec.rb
, let's add:
context "redirectable_document?" do
let(:generator) { JekyllRedirectFrom::Generator.new }
it "accepts subclasses of Jekyll::Document" do
SubclassOfJekyllDocument = Class.new(Jekyll::Document)
expect(generator.send(:redirectable_document?, SubclassOfJekyllDocument.new)).to be_truthy
end
it "accepts subclasses of Jekyll::Document" do
SubclassOfJekyllPage = Class.new(Jekyll::Page)
expect(generator.send(:redirectable_document?, SubclassOfJekyllPage.new)).to be_truthy
end
end
I haven't run the above code but hopefully it gets you started. 🚀
Sorry guys, busy life happened. I have added the tests with a little modification.
@jekyllbot: merge +minor
Implements the issue #203