Sha256: c0363671282026c5e8d518d9670e55cde481c8c7d632e3ed5800d51a2e4b13c9

Contents?: true

Size: 516 Bytes

Versions: 15

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

describe 'GH-767', site: true do
  before do
    File.write('content/donkey.md', 'Compiled content donkey!')

    File.write('Rules', <<EOS)
  compile '/**/*' do
    filter :erb, stuff: item.path
    write '/donkey.html'
  end

  layout '/foo.*', :erb
EOS
  end

  it 'does not expose #path on @item' do
    site = Nanoc::Int::SiteLoader.new.new_from_cwd
    expect { site.compile }.to raise_error(NoMethodError, /undefined method .*path.* for .*Nanoc::ItemWithoutRepsView/)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-4.8.9 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.8 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.7 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.6 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.5 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.4 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.3 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.2 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.1 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.8.0 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.7.14 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.7.13 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.7.12 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.7.11 spec/nanoc/regressions/gh_767_spec.rb
nanoc-4.7.10 spec/nanoc/regressions/gh_767_spec.rb