Sha256: af6396579771567d65a3b8098149096c36f6cec79faac40bb5d3333cd3a9a1ef

Contents?: true

Size: 653 Bytes

Versions: 7

Compression:

Stored size: 653 Bytes

Contents

require 'spec_helper'

describe Query::Live do

  before(:each) do
    @indexed  = stub :indexed
    @index = stub :index, :indexed => @indexed
  end

  describe 'result_type' do
    before(:each) do
      @query = described_class.new @index
    end
    it "should return a specific type" do
      @query.result_type.should == Internals::Results::Live
    end
  end

  describe "execute" do
    before(:each) do
      @query = described_class.new @index
    end
    it "should get allocations" do
      @query.result_type.should_receive :from
      @query.should_receive(:sorted_allocations).once

      @query.execute 'some_query', 0
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
picky-1.5.4 spec/lib/query/live_spec.rb
picky-1.5.3 spec/lib/query/live_spec.rb
picky-1.5.2 spec/lib/query/live_spec.rb
picky-1.5.1 spec/lib/query/live_spec.rb
picky-1.5.0 spec/lib/query/live_spec.rb
picky-1.4.3 spec/lib/query/live_spec.rb
picky-1.4.2 spec/lib/query/live_spec.rb