# 编写 Ruby 插件测试的建议

**URL:** https://meta.discourse.org/t/advice-on-writing-ruby-tests-for-plugins/108110
**Category:** Development
**Created:** [2019年二月1日 09:52 UTC](https://meta.discourse.org/t/advice-on-writing-ruby-tests-for-plugins/108110 "2019-02-01T09:52:27Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![kleinfreund](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@kleinfreund](https://meta.discourse.org/u/kleinfreund)
#### Post date: [2019年二月1日 12:29 UTC](https://meta.discourse.org/t/advice-on-writing-ruby-tests-for-plugins/108110/11 "2019-02-01T12:29:32Z")

</div>

That’s it! I updated the original post to include this information. You might also want to revert the change in [DEV: Allow rake plugin:spec to traverse symlinks · discourse/discourse@dfd63b1 · GitHub](https://github.com/discourse/discourse/commit/dfd63b185f3b5279f49f979638dd17c30431669e) as traversal of symbolic links works already, right?

* * *

Regarding the testability question, I will clear the database in the tests which will not mess with the database from the development environment because all transactions will be rolled back.

---

_[View the full topic](https://meta.discourse.org/t/advice-on-writing-ruby-tests-for-plugins/108110)._
