Sha256: d5df049b2eef242201b0fb57b0b0e3a88d35e1892bda8f3cb82f0fbdb9596395

Contents?: true

Size: 547 Bytes

Versions: 8

Compression:

Stored size: 547 Bytes

Contents

require 'spec_helper'

describe Locomotive::Steam::Liquid::Drops::SectionBlock do

  let(:section) { instance_double('Section', definition: { 'blocks' => [] }) }
  let(:block) { instance_double('block') }
  let(:index) { 0 }
  let(:drop) { described_class.new(section, block, index) }

  describe '#has_leaves?' do

    subject { drop.has_leaves? }

    it { is_expected.to eq false }

    context 'the block has leaves' do

      before { drop.leaves << instance_double('SectionBlock') }

      it { is_expected.to eq true }

    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_steam-1.8.0.alpha2 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.8.0.alpha1 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.7.1 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.7.0 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.6.1 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.6.0 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.6.0.rc1 spec/unit/liquid/drops/section_block_spec.rb
locomotivecms_steam-1.6.0.beta1 spec/unit/liquid/drops/section_block_spec.rb