# 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:** 1

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [16 januari 2021 om 16:25 UTC](https://meta.discourse.org/t/plugin-tests-fail-with-undefined-method-test-transaction/176292/1 "2021-01-16T16:25:31Z")

</div>

I built [a plugin](https://github.com/seanblue/discourse-ruby) last year and wanted to verify that it still works on the latest version of Discourse. After reinitializing my dev environment (I had DB migration issues) I was able to manually verify that the plugin still works. However, when I run my [spec tests](https://github.com/seanblue/discourse-ruby/blob/master/spec/markdown_ruby_spec.rb) (which passed last year when I wrote them), I get the following error:

```plaintext
Failure/Error: DB.test_transaction = ActiveRecord::Base.connection.current_transaction
      
      NoMethodError:
        undefined method `test_transaction=' for #<MiniSqlMultisiteConnection:0x00007fb8b3815c40>

```

I also had [Discourse Footnote](https://meta.discourse.org/t/discourse-footnote/84533) installed locally, and I get the same error when I run those tests.

Can anyone suggest how to fix my environment and/or my tests so that they pass on the current version of Discourse?

---

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