黄瓜给出 Sqlite3 错误
我刚刚开始使用 Cucumber,但遇到了一个奇怪的错误:
SQLite3::SQLException: no such table: venues: SELECT "venues".* FROM "venues" (ActiveRecord::StatementInvalid)
./app/controllers/venues_controller.rb:5:in `index'
<internal:prelude>:10:in `synchronize'
./features/step_definitions/web_steps.rb:18:in `/^(?:|I )am on (.+)$/'
features/most_popular_bands.feature:8:in `Given I am on the home page'
这来自 Given
步骤,其中我提到了主页,其中包含场地表中的项目列表。我想知道为什么 Cucumber 找不到那张桌子。
顺便说一句,我没有通过自动测试来运行它。我正在使用bundle exec cucumber
。
I just started using Cucumber, but I am running into a weird error:
SQLite3::SQLException: no such table: venues: SELECT "venues".* FROM "venues" (ActiveRecord::StatementInvalid)
./app/controllers/venues_controller.rb:5:in `index'
<internal:prelude>:10:in `synchronize'
./features/step_definitions/web_steps.rb:18:in `/^(?:|I )am on (.+)$/'
features/most_popular_bands.feature:8:in `Given I am on the home page'
This comes from the Given
step, where I mention the home page, which has a list of items from the venues tables. I wonder why Cucumber cannot find that table.
Btw, I am not running it with autotest. I am using bundle exec cucumber
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我让它与
rake cucumber
一起工作。I got it working with
rake cucumber
.看起来您正在旧版本的数据库上执行您的功能。尝试使用 rake db:test:clone 将开发数据库的方案复制到测试数据库。
It looks like you're executing your features on old version of the database. Try
rake db:test:clone
to copy the scheme of your development database to the test database.