Sha256: 8249d1de52c5fb4c6b14ea190346814f0296ce626404d76d7882ea2a1efe1ffe
Contents?: true
Size: 840 Bytes
Versions: 12
Compression:
Stored size: 840 Bytes
Contents
# frozen_string_literal: true RSpec.describe Blacklight::Configurable do subject do Class.new do include Blacklight::Configurable def some_existing_action 1 end end end describe ".add_show_tools_partial" do it "defines an action method" do subject.blacklight_config.add_show_tools_partial :xyz expect(subject.new).to respond_to :xyz end it "does not replace an existing method" do subject.blacklight_config.add_show_tools_partial :some_existing_action expect(subject.new.some_existing_action).to eq 1 end it "allows the configuration to opt out of creating a method" do subject.blacklight_config.add_show_tools_partial :some_missing_action, define_method: false expect(subject.new).not_to respond_to :some_missing_action end end end
Version data entries
12 entries across 12 versions & 2 rubygems