Sha256: 49c9b76be5ca68fcfd6377be9c701d318324aa96b9f312bdea1e2664dd12d1bc
Contents?: true
Size: 524 Bytes
Versions: 1
Compression:
Stored size: 524 Bytes
Contents
# encoding: UTF-8 require 'spec_helper' describe Esearch::Presenter::Hit, '#source' do subject { object.source } let(:object) { described_class.new(raw) } let(:value) { double('Value') } context 'when _source is present' do let(:raw) { { '_source' => value } } it { should be(value) } it_should_behave_like 'an idempotent method' end context 'when _source is NOT present' do let(:raw) { {} } it { should be(nil) } it_should_behave_like 'an idempotent method' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
esearch-0.2.2 | spec/unit/esearch/presenter/hit/source_spec.rb |