Sha256: 3c5d34988df4c852889a2b25da78c4710bc903bc46902afe0f32802c6edc25fa

Contents?: true

Size: 645 Bytes

Versions: 26

Compression:

Stored size: 645 Bytes

Contents

require 'spec_helper'

RSpec.describe ActiveFedora::Indexing::Map::IndexObject do
  describe "with a block" do
    subject(:instance) do
      described_class.new(:name) do |index|
        index.as :stored_searchable, :facetable
      end
    end

    it "can set behaviors" do
      expect(instance.behaviors).to eq [:stored_searchable, :facetable]
    end
  end

  describe "with an initializer parameters" do
    subject(:instance) do
      described_class.new(:name, behaviors: [:stored_searchable, :facetable])
    end

    it "can set behaviors" do
      expect(instance.behaviors).to eq [:stored_searchable, :facetable]
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
active-fedora-11.5.0 spec/unit/indexing/map/index_object_spec.rb
active-fedora-11.4.1 spec/unit/indexing/map/index_object_spec.rb
active-fedora-11.4.0 spec/unit/indexing/map/index_object_spec.rb
active-fedora-11.3.1 spec/unit/indexing/map/index_object_spec.rb
active-fedora-11.3.0 spec/unit/indexing/map/index_object_spec.rb
active-fedora-11.2.0 spec/unit/indexing/map/index_object_spec.rb