Sha256: ed77219b2158ba06be923459dc93d2f267f03ad9039000b6c372665533d1231c

Contents?: true

Size: 876 Bytes

Versions: 8

Compression:

Stored size: 876 Bytes

Contents

require 'spec_helper'

describe QuickClassificationQuery do
  let(:normalizer) { lambda {|name| name.to_s.classify } }
  let(:registered_curation_concern_names) { [described_class.name] }
  let(:curation_concern_names_to_try) { ['GenericWork', described_class.name, 'Object'] }

  subject { described_class.new(query_context, options) }
  let(:options) {
    {
      concern_name_normalizer: normalizer,
      registered_curation_concern_names: registered_curation_concern_names,
      curation_concern_names_to_try: curation_concern_names_to_try
    }
  }
  let(:query_context) { double }

  context '#all' do
    its(:all) { should == [described_class] }
  end

  context '.each_for_context' do
    it 'should yield' do
      expect {|b|
        described_class.each_for_context(query_context, options, &b)
      }.to yield_successive_args(described_class)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
curate-0.6.0 spec/models/quick_classification_query_spec.rb
curate-0.5.6 spec/models/quick_classification_query_spec.rb
curate-0.5.5 spec/models/quick_classification_query_spec.rb
curate-0.5.4 spec/models/quick_classification_query_spec.rb
curate-0.5.2 spec/models/quick_classification_query_spec.rb
curate-0.5.1 spec/models/quick_classification_query_spec.rb
curate-0.5.0 spec/models/quick_classification_query_spec.rb
curate-0.4.2 spec/models/quick_classification_query_spec.rb