Sha256: 595ec3d2be695ac2a0cf5ff921129e84742b3202af262e16f6ebe3f83b0e598a

Contents?: true

Size: 751 Bytes

Versions: 29

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

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

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

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

  describe '#load' do

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

    subject { loader.load(scope) }

    it 'tests various stuff' do
      expect(subject.size).to eq 1
      expect(subject.first[:key]).to eq('powered_by')
      expect(subject.first[:values]).to eq({ 'en' => 'Powered by', 'fr' => 'Propulsé par' })
    end

  end

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
locomotivecms_steam-1.1.2 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.0 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.0.rc3 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.0.rc2 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.0.rc1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.2.0.beta1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.1.1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.1.0 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.1.0.rc3 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.1.0.rc2 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.1.0.rc1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.1 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc10 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc9 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc8 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc6 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc4 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb
locomotivecms_steam-1.0.0.rc3 spec/unit/adapters/filesystem/yaml_loaders/translation_spec.rb