Sha256: 1cc38dcb07ea30dfaeb016a54a3acf30e6fee3e048edc1566feb0de596c25611

Contents?: true

Size: 737 Bytes

Versions: 30

Compression:

Stored size: 737 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Category, "Realtime API" do

  Thing = Struct.new :id, :text

  let(:category) do
    index    = Picky::Index.new :some_index_name
    category = described_class.new :text, index
  end

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

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
picky-4.3.0 spec/category_realtime_spec.rb
picky-4.2.4 spec/category_realtime_spec.rb
picky-4.2.3 spec/category_realtime_spec.rb
picky-4.2.2 spec/category_realtime_spec.rb
picky-4.2.1 spec/category_realtime_spec.rb
picky-4.2.0 spec/category_realtime_spec.rb
picky-4.1.0 spec/category_realtime_spec.rb
picky-4.0.9 spec/category_realtime_spec.rb
picky-4.0.8 spec/category_realtime_spec.rb
picky-4.0.7 spec/category_realtime_spec.rb
picky-4.0.6 spec/category_realtime_spec.rb
picky-4.0.5 spec/category_realtime_spec.rb
picky-4.0.4 spec/category_realtime_spec.rb
picky-4.0.3 spec/category_realtime_spec.rb
picky-4.0.1 spec/category_realtime_spec.rb
picky-4.0.0 spec/category_realtime_spec.rb
picky-4.0.0pre6 spec/category_realtime_spec.rb
picky-4.0.0pre5 spec/category_realtime_spec.rb
picky-4.0.0pre3 spec/category_realtime_spec.rb
picky-4.0.0pre2 spec/category_realtime_spec.rb