# 我如何只运行discourse/plugins/poll/spec？

**URL:** <https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244>\
**Category:** Development\
**Created:** [2016 年7 月 13 日 19:35 UTC](https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244 "2016-07-13T19:35:38Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

作者： ![markvanlan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markvanlan/32/160087_2.png) [@markvanlan](https://meta.discourse.org/u/markvanlan)\
发布日期： [2019 年11 月 19 日 18:15 UTC](https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244/11 "2019-11-19T18:15:16Z")

</div>

我在运行以下命令后遇到了运行插件规范的问题：

```plaintext
RAILS_ENV=test bin/rake db:migrate

```

我正在测试的插件中的迁移并未执行。随后我运行了：

```plaintext
LOAD_PLUGINS=1 RAILS_ENV=test bundle exec rake db:migrate

```

现在我的插件迁移已成功应用！

有趣的是， **没有** 设置 `LOAD_PLUGINS=1` 且在 `development` 环境下，插件迁移能够运行，但在 `testing` 环境下迁移却未执行。

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244)._
