Sha256: 253af49f9633e8bda0ebcacb0f2b12ece3529d2f4113f2d91aaed0f427bc1e90

Contents?: true

Size: 629 Bytes

Versions: 17

Compression:

Stored size: 629 Bytes

Contents

require 'spec_helper'

describe Locomotive::Steam::Section do

  let(:attributes)  { {} }
  let(:section)     { described_class.new(attributes) }

  describe '#source' do

    let(:attributes) { { template:  "Hello world"} }

    subject { section.source }
    it { is_expected.to eq 'Hello world' }

  end

  describe '#definition' do
    let(:attributes) { { definition: { name: 'aName' } } }
    subject { section.definition }
    it { is_expected.to eq({ 'name' => 'aName' }) }
  end

  describe '#type' do
    let(:attributes) { { slug: 'hero' } }
    subject { section.type }
    it { is_expected.to eq 'hero' }
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
locomotivecms_steam-1.8.0.alpha2 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.8.0.alpha1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.7.1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.7.0 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.6.1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.6.0 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.6.0.rc1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.6.0.beta1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.3 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.2 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0.rc1 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0.rc0 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0.beta3 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0.beta2 spec/unit/entities/section_spec.rb
locomotivecms_steam-1.5.0.beta1 spec/unit/entities/section_spec.rb