将与 Cucumber 一起使用的数据库更改为 _test 数据库而不是 _development

发布于 2024-09-05 20:02:51 字数 404 浏览 3 评论 0原文

无论出于何种原因,我的黄瓜正在使用我的 _development 数据库而不是我的 _test 数据库。

我该如何改变这一点?

这就是我的database.yml所说的,

test: &test
  adapter: mysql
  encoding: utf8
  database: myapp_test

但我得到错误数据库配置没有指定适配器

这也在底部....我只能假设这是SUPPOSSED将其设置为使用测试数据库

cucumber: &CUCUMBER
  <<: *test
culerity:
  <<: *CUCUMBER

但是,唉,测试数据库从未被触及

For whatever reason, my cucumber is using my _development db instead of my _test db.

How do I change that?

This is what my database.yml says

test: &test
  adapter: mysql
  encoding: utf8
  database: myapp_test

but i get the error database configuration does not specify adapter

This is also at the bottom.... I can only assume that this is SUPPOSSED to set it to use the test db

cucumber: &CUCUMBER
  <<: *test
culerity:
  <<: *CUCUMBER

but, alas, the test db is never touched

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆沫 2024-09-12 20:02:51

是否有类似以下内容?

ENV["RAILS_ENV"] ||= 'test'

您的 features/support/env.rb 文件中

Do you have something like:

ENV["RAILS_ENV"] ||= 'test'

in your features/support/env.rb file?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文