lib/rspec/helpers.rb in external_services-0.1.4 vs lib/rspec/helpers.rb in external_services-0.1.5

- old
+ new

@@ -63,9 +63,12 @@ end end if :destroy.in? methods it 'creates action on delete' do + @api_object.send("#{@id_key}=", SecureRandom.hex) + @api_object.save + if @api_object.respond_to?(:descendants) @api_object.reload.descendants.each(&:delete) end @api_object.destroy expect_api_action_on_destroy(@api_object)