spec/trackable_spec.rb in mongoid-history-0.0.9 vs spec/trackable_spec.rb in mongoid-history-0.1.0

- old
+ new

@@ -41,11 +41,12 @@ :on => :all, :modifier_field => :modifier, :version_field => :version, :scope => :my_model, :except => ["created_at", "updated_at", "version", "modifier_id", "_id", "id"], - :track_create => false + :track_create => false, + :track_destroy => false, } end after :each do Mongoid::History.trackable_classes = nil @@ -60,9 +61,13 @@ MyModel.new.private_methods.collect(&:to_sym).should include(:track_update) end it "should define callback function #track_create" do MyModel.new.private_methods.collect(&:to_sym).should include(:track_create) + end + + it "should define callback function #track_destroy" do + MyModel.new.private_methods.collect(&:to_sym).should include(:track_destroy) end it "should define #history_trackable_options" do MyModel.history_trackable_options.should == @expected_option end