Sha256: 879ba569aa2d319f51c77a50c531d33e6c2492633a55844e91fef06b80d59093

Contents?: true

Size: 750 Bytes

Versions: 3

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

require_relative 'support/mutable_document_view_examples'

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

3 entries across 3 versions & 1 rubygems

Version Path
nanoc-4.8.12 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.8.11 spec/nanoc/base/views/mutable_item_view_spec.rb
nanoc-4.8.10 spec/nanoc/base/views/mutable_item_view_spec.rb