Sha256: f4eeee8a08ae2f2597e81c5e52ef90fbba8bce5912a6b63b740b8a1552eddcc1

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

require 'spec_helper'

require_relative '../../../../../lib/locomotive/steam/adapters/filesystem/yaml_loader.rb'
require_relative '../../../../../lib/locomotive/steam/adapters/filesystem/yaml_loaders/section.rb'

describe Locomotive::Steam::Adapters::Filesystem::YAMLLoaders::Section do

  let(:site_path) { default_fixture_site_path }
  let(:loader)    { described_class.new(site_path) }

  describe '#load' do

    let(:scope) { instance_double('Scope', default_locale: :en) }

    subject { loader.load(scope).sort { |a, b| a[:name] <=> b[:name] } }

    it 'tests various stuff' do
      expect(subject.size).to eq 3
      expect(subject.first[:slug]).to eq('carousel')
      expect(subject[1][:name]).to eq('Footer')
      expect(subject[2][:name]).to eq('Header')
      expect(subject[2][:slug]).to eq('header')
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms_steam-1.5.0.rc0 spec/unit/adapters/filesystem/yaml_loaders/section_spec.rb
locomotivecms_steam-1.5.0.beta3 spec/unit/adapters/filesystem/yaml_loaders/section_spec.rb
locomotivecms_steam-1.5.0.beta2 spec/unit/adapters/filesystem/yaml_loaders/section_spec.rb
locomotivecms_steam-1.5.0.beta1 spec/unit/adapters/filesystem/yaml_loaders/section_spec.rb