Sha256: 0b613adc3e6ef09479657d9acd918a754723f6538002f381bc2ae3f041ab41f0

Contents?: true

Size: 553 Bytes

Versions: 22

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

describe Spotlight::CustomTranslationExtension do
  subject do
    Class.new(ActiveRecord::Base) do
      include Spotlight::CustomTranslationExtension
    end
  end

  let(:exhibit) { FactoryBot.create(:exhibit) }

  describe '.current_exhibit' do
    it 'sets the current exhibit' do
      subject.current_exhibit = exhibit
      expect(subject.current_exhibit).to eq exhibit
    end

    it 'reloads the i18n' do
      allow(I18n.backend).to receive(:reload!)

      subject.current_exhibit = exhibit
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.3.0 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.2.0 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.1.0 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.3 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.2 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.1 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/models/spotlight/custom_translation_extension_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/models/spotlight/custom_translation_extension_spec.rb