Search code examples
ruby-on-railsrspecfactory-botrspec-railsruby-paranoia

Soft deletion with paranoia and factory girl


When I call delete on records in rspec it seems they are permanently deleted. I assume this has something to do with factory girl. Is there a way to test soft deletion with paranoia, factory girls, rails and rspec without doing anything invasive?


Solution

  • Soft delete is triggered by calling destroy, not delete, which skips callbacks.