Sha256: cae3e0c0f88b14ed362130f114f1a33896c45c2d5660793e77056a6c71c04130

Contents?: true

Size: 492 Bytes

Versions: 1

Compression:

Stored size: 492 Bytes

Contents

require 'spec_helper'

describe Esearch::Presenter::Aspect::Range, '#to' do
  subject { object.to }

  let(:object) { described_class.new(raw) }
  let(:value) { mock('Value') }

  context 'when _source is present' do
    let(:raw) { { 'to' => 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.0 spec/unit/esearch/presenter/aspect/range/to_spec.rb