Sha256: e661a2b5a2a80cc13cbbb26421d099b0968a5306bcd3b7e7c59dcc9e90803e5b

Contents?: true

Size: 729 Bytes

Versions: 111

Compression:

Stored size: 729 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Index, "Realtime API" do

  RealtimeThing = 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 RealtimeThing.new(1, 'text')
  end
  it 'offers a remove method' do
    index.remove 1
  end
  it 'offers a replace method' do
    index.replace RealtimeThing.new(1, 'text')
  end
  it 'offers a << method' do
    index << RealtimeThing.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 RealtimeThing.new(1, 'text')
  end

end

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
picky-4.31.3 spec/lib/index_realtime_spec.rb
picky-4.31.2 spec/lib/index_realtime_spec.rb
picky-4.31.1 spec/lib/index_realtime_spec.rb
picky-4.31.0 spec/lib/index_realtime_spec.rb
picky-4.30.0 spec/lib/index_realtime_spec.rb
picky-4.29.0 spec/lib/index_realtime_spec.rb
picky-4.28.1 spec/lib/index_realtime_spec.rb
picky-4.27.1 spec/lib/index_realtime_spec.rb
picky-4.27.0 spec/lib/index_realtime_spec.rb
picky-4.26.2 spec/lib/index_realtime_spec.rb
picky-4.26.1 spec/lib/index_realtime_spec.rb
picky-4.26.0 spec/lib/index_realtime_spec.rb
picky-4.25.3 spec/lib/index_realtime_spec.rb
picky-4.25.2 spec/lib/index_realtime_spec.rb
picky-4.25.1 spec/lib/index_realtime_spec.rb
picky-4.25.0 spec/lib/index_realtime_spec.rb
picky-4.24.0 spec/lib/index_realtime_spec.rb
picky-4.23.2 spec/lib/index_realtime_spec.rb
picky-4.23.1 spec/lib/index_realtime_spec.rb
picky-4.23.0 spec/lib/index_realtime_spec.rb