Sha256: 8d90bad117e23330dc10bb07ecec99ca84037e7772af6a851fe8fe823ac1daab

Contents?: true

Size: 694 Bytes

Versions: 8

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

describe Nanoc::MutableItemView do
  let(:entity_class) { Nanoc::Int::Item }
  it_behaves_like 'a mutable document view'

  let(:item) { entity_class.new('content', {}, '/asdf/') }
  let(:view) { described_class.new(item, nil) }

  it 'does have rep access' do
    expect(view).not_to respond_to(:compiled_content)
    expect(view).not_to respond_to(:path)
    expect(view).not_to respond_to(:reps)
  end

  describe '#inspect' do
    let(:item) { Nanoc::Int::Item.new('content', {}, '/asdf/') }
    let(:view) { described_class.new(item, nil) }

    subject { view.inspect }

    it { is_expected.to eql('<Nanoc::MutableItemView identifier=/asdf/>') }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc-4.8.2 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.8.1 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.8.0 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.7.14 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.7.13 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.7.12 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.7.11 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.7.10 spec/nanoc/base/views/mutable_item_view_spec.rb