Sha256: df7bdfe435574b00ce5993fa8525b495347dfedd736d2ec30e5474894302caae
Contents?: true
Size: 1.33 KB
Versions: 28
Compression:
Stored size: 1.33 KB
Contents
# frozen_string_literal: true RSpec.describe Blacklight::Engine do [:bookmarks_http_method, :email_regexp, :facet_missing_param, :sms_mappings].each do |dep_key| describe "config.#{dep_key}" do subject { described_class.config } let(:unlikely_value) { 'unlikely value' } it 'is deprecated' do allow(Deprecation).to receive(:warn) subject.send(dep_key) expect(Deprecation).to have_received(:warn) end it 'delegates to config.blacklight' do allow(subject.blacklight).to receive(dep_key).and_return(unlikely_value) expect(subject.send(dep_key)).to eql(unlikely_value) end end describe "config.#{dep_key}=" do subject { described_class.config } let(:unlikely_value) { 'unlikely value' } it 'is deprecated' do allow(Deprecation).to receive(:warn) allow(subject.blacklight).to receive(:"#{dep_key}=").with(unlikely_value) subject.send(:"#{dep_key}=", unlikely_value) expect(Deprecation).to have_received(:warn) end it 'delegates to config.blacklight' do allow(subject.blacklight).to receive(:"#{dep_key}=").with(unlikely_value) subject.send(:"#{dep_key}=", unlikely_value) expect(subject.blacklight).to have_received(:"#{dep_key}=").with(unlikely_value) end end end end
Version data entries
28 entries across 28 versions & 2 rubygems