Sha256: 4ce202c0997bcf2ad29d9bd5ae5599ace6f48bda7943de9caf195800485c3976

Contents?: true

Size: 533 Bytes

Versions: 4

Compression:

Stored size: 533 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "test_helper")

class WorklingDelta::IndexerTest < Test::Unit::TestCase
    context "an indexer" do
    should "spawn a worker with the delta index name when an index is triggered" do
      mock(WorklingDelta::Worker).async_index(:index_name => "test_model_delta", :document_id => nil)

      WorklingDelta::Indexer.new(ThinkingSphinx::Index.new(TestModel), {}).do_index(TestModel)
    end
  end

end

class TestModel < ActiveRecord::Base
  define_index do
    indexes :id
  end
end


Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
dpickett-workling_delta_indexer-0.1.0 test/workling_delta/indexer_test.rb
dpickett-workling_delta_indexer-0.1.1 test/workling_delta/indexer_test.rb
lostboy-workling_delta_indexer-0.1.1.1 test/workling_delta/indexer_test.rb
workling_delta_indexer-0.1.2 test/workling_delta/indexer_test.rb