Sha256: 79267bc69bd657ab1437c1209af8e081256943a45e73f4ae2b758fd38414792f

Contents?: true

Size: 689 Bytes

Versions: 10

Compression:

Stored size: 689 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Index, "Realtime API" do

  Thing = Struct.new :id, :text

  let(:index) do
    described_class.new :some_index_name do
      category :text
    end
  end

  it 'offers an add method' do
    index.add Thing.new(1, 'text')
  end
  it 'offers a remove method' do
    index.remove 1
  end
  it 'offers a replace method' do
    index.replace Thing.new(1, 'text')
  end
  it 'offers a << method' do
    index << Thing.new(1, 'text')
  end
  # it 'offers a >> method' do
  #   Thing.new(1, 'text') >> index # I mean, as long as we're dreaming.
  # end
  it 'offers an unshift method' do
    index.unshift Thing.new(1, 'text')
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
picky-4.0.0pre1 spec/lib/index_realtime_spec.rb
picky-3.6.16 spec/lib/index_realtime_spec.rb
picky-3.6.15 spec/lib/index_realtime_spec.rb
picky-3.6.14 spec/lib/index_realtime_spec.rb
picky-3.6.13 spec/lib/index_realtime_spec.rb
picky-3.6.12 spec/lib/index_realtime_spec.rb
picky-3.6.11 spec/lib/index_realtime_spec.rb
picky-3.6.10 spec/lib/index_realtime_spec.rb
picky-3.6.9 spec/lib/index_realtime_spec.rb
picky-3.6.8 spec/lib/index_realtime_spec.rb