Permalink
Browse files

add some more integration specs

  • Loading branch information...
1 parent 5aa5065 commit b53085b4a5d56189ce86b439b10d451d020880f9 @jamesgolick committed Jan 25, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/integration/offline_indexing_spec.rb
@@ -5,7 +5,7 @@
$db.drop_table :awesome_things if $db.table_exists?(:awesome_things)
if $db.table_exists?(:index_awesome_things_on_name)
- $db.drop_table :awesome_things_on_name
+ $db.drop_table :index_awesome_things_on_name
end
@klass = Class.new do
@@ -28,4 +28,10 @@ def self.table_name; "awesome_things"; end
it "builds the missing index rows for all the rows in the doc table" do
@klass.all(:name => "James").should == @jameses
end
+
+ it "ignores records that are already in the index" do
+ lambda {
+ Friendly::Indexer.populate(@klass, :name)
+ }.should_not raise_error
+ end
end

0 comments on commit b53085b

Please sign in to comment.