# Plugin tests mislukken met "undefined method \`test\_transaction='"

**URL:** <https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292>\
**Category:** Development\
**Created:** [16 januari 2021 om 16:25 UTC](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292 "2021-01-16T16:25:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [25 januari 2021 om 01:10 UTC](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292/5 "2021-01-25T01:10:25Z")

</div>

It looks like the `d/rake` script defaults to the `development` environment by default so you’ll need to run the following instead: `RAILS_ENV=test d/rake plugin:spec['discourse-ruby']`

---

_[View the full topic](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292)._
