Sha256: 09225d6e9c0593725948e9d85300a323c6de5a98d01306783cba403aa0f34b43

Contents?: true

Size: 796 Bytes

Versions: 1

Compression:

Stored size: 796 Bytes

Contents

require 'spec_helper'

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

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

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

  describe '#load' do

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

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

    it 'tests various stuff' do
      expect(subject.size).to eq 24
      expect(subject.first[:title]).to eq(en: 'Page not found')
      expect(subject[14][:slug]).to eq(en: 'music', fr: 'notre-musique')
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.pre.alpha spec/unit/adapters/filesystem/yaml_loaders/page_spec.rb