Sha256: a5c7e62698ff964b763e6638cc86325bc1748742b5b3edaed4462faaf2e95c81
Contents?: true
Size: 1.4 KB
Versions: 24
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true describe Blacklight::Rendering::Pipeline do include Capybara::RSpecMatchers let(:document) { instance_double(SolrDocument) } let(:context) { double } let(:options) { double } let(:presenter) { described_class.new(values, field_config, document, context, options) } describe "render" do subject { presenter.render } let(:values) { ['a', 'b'] } let(:field_config) { Blacklight::Configuration::NullField.new } it { is_expected.to eq "a and b" } context "when separator_options are in the config" do let(:values) { ['c', 'd'] } let(:field_config) { Blacklight::Configuration::NullField.new(separator: nil, itemprop: nil, separator_options: { two_words_connector: '; '}) } it { is_expected.to eq "c; d" } end context "when itemprop is in the config" do let(:values) { ['a'] } let(:field_config) { Blacklight::Configuration::NullField.new(separator: nil, itemprop: 'some-prop', separator_options: nil) } it { is_expected.to have_selector("span[@itemprop='some-prop']", :text => "a") } end end describe "#operations" do subject { described_class.operations } it { is_expected.to eq [Blacklight::Rendering::HelperMethod, Blacklight::Rendering::LinkToFacet, Blacklight::Rendering::Microdata, Blacklight::Rendering::Join] } end end
Version data entries
24 entries across 24 versions & 1 rubygems