spec/stratify/integration_spec.rb in stratify-base-0.1.3 vs spec/stratify/integration_spec.rb in stratify-base-0.1.4

- old
+ new

@@ -8,24 +8,24 @@ Stratify::Bacon::Activity.where(:slices => 3, :created_at => Time.new(2011, 4, 3, 7, 2)).should exist Stratify::Bacon::Activity.where(:slices => 5, :created_at => Time.new(2011, 4, 7, 8, 17)).should exist Stratify::Bacon::Activity.where(:slices => 4, :created_at => Time.new(2011, 4, 9, 6, 24)).should exist end - + it "does not import duplicate activities" do collector = Stratify::Bacon::Collector.new(:username => "johndoe", :password => "secret") expect { collector.run }.to change(Stratify::Bacon::Activity, :count).by(3) expect { collector.run }.to change(Stratify::Bacon::Activity, :count).by(0) end - + it "does not re-import soft-deleted activities" do collector = Stratify::Bacon::Collector.new(:username => "johndoe", :password => "secret") collector.run activity = Stratify::Bacon::Activity.where(:created_at => Time.new(2011, 4, 3, 7, 2)).first activity.should be activity.delete - + collector.run Stratify::Bacon::Activity.where(:created_at => Time.new(2011, 4, 3, 7, 2)).should_not exist end end