Sha256: 73f91fee354f52ce57f4dcb05f35913f03e247d6fa19bd841033b110878b5ed6

Contents?: true

Size: 634 Bytes

Versions: 13

Compression:

Stored size: 634 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Blacklight::Solr::Document::MoreLikeThis do
  before(:all) do
    @mock_class = Class.new do
      include Blacklight::Solr::Document
    end
  end
  
  it "should pluck the MoreLikeThis results from the Solr Response" do
    mock_solr_response = double(:more_like => [{'id' => 'abc'}])
    result = @mock_class.new({:id => '123'}, mock_solr_response).more_like_this
    result.should have(1).item
    result.first.should be_a_kind_of(SolrDocument)
    result.first.id.should == 'abc'
    result.first.solr_response.should == mock_solr_response
  end 
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
blacklight-4.7.0 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.7.0.pre1 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.6.3 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.6.2 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.6.1 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-5.0.0.pre1 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.6.0 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.5.0 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.5.0.rc1 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.4.2 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.4.1 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.4.0 spec/lib/blacklight_solr_document_more_like_this_spec.rb
blacklight-4.3.0 spec/lib/blacklight_solr_document_more_like_this_spec.rb