Sha256: 57bc6c7f3bbbc6ee7b69a4e089a7c1e824e0ccc9fdfd2cdd8ae4b0e3b8453ed0

Contents?: true

Size: 777 Bytes

Versions: 4

Compression:

Stored size: 777 Bytes

Contents

# 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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-redirect-from-0.16.0 spec/jekyll_redirect_from/layout_spec.rb
jekyll-redirect-from-0.15.0 spec/jekyll_redirect_from/layout_spec.rb
jekyll-redirect-from-0.14.0 spec/jekyll_redirect_from/layout_spec.rb
jekyll-redirect-from-0.13.0 spec/jekyll_redirect_from/layout_spec.rb