1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# frozen_string_literal: true
RSpec.describe JekyllRedirectFrom::Layout do
subject { described_class.new(@site) }
it "exposes the site" do
expect(subject.site).to eql(@site)
end
it "exposes the name" do
expect(subject.name).to eql("redirect.html")
end
# it "exposes the path" do
# expected = File.expand_path "../../lib/jekyll-redirect-from/redirect.html", __dir__
# expect(subject.path).to eql(expected)
# end
it "exposes the relative path" do
expect(subject.relative_path).to eql("_layouts/redirect.html")
end
it "exposes the ext" do
expect(subject.ext).to eql("html")
end
it "exposes data" do
expect(subject.data).to eql({})
end
it "exposes content" do
expect(subject.content).to match("Redirecting...")
end
end
|