黄瓜泡菜、机械师和 Mongoid

发布于 2024-09-09 09:56:06 字数 727 浏览 8 评论 0原文

我正在使用带有 Rails、Cucumber 和 mongoid 的 pickle 0.3.0。我确实发现 pickle0.3.0 会自动找到 ORM。但是,当我编写一个黄瓜场景并对其进行测试时,它没有找到任何泡菜步骤。

这里是示例:

Scenario: logging in user
  Given the following users exists
  |name|
  |John|
  |white|

但没有找到 pickle 步骤

# create models from a table
Given(/^the following #{capture_plural_factory} exists?:?$/) do |plural_factory, table|
  create_models_from_table(plural_factory, table)
end

并生成此错误

You can implement step definitions for undefined steps with these snippets:

Given /^the following users should exists$/ do |table|
  # table is a Cucumber::Ast::Table
  pending # express the regexp above with the code you wish you had
end

有什么想法吗?

I'm using pickle 0.3.0 with rails, cucumber and mongoid. I do found that pickle0.3.0 automatically finds the ORM. But while I wrote a cucumber scenario and tested it, It didn't find any pickle steps.

Here is the sample:

Scenario: logging in user
  Given the following users exists
  |name|
  |John|
  |white|

But didn't find pickle step

# create models from a table
Given(/^the following #{capture_plural_factory} exists?:?$/) do |plural_factory, table|
  create_models_from_table(plural_factory, table)
end

and generates this error

You can implement step definitions for undefined steps with these snippets:

Given /^the following users should exists$/ do |table|
  # table is a Cucumber::Ast::Table
  pending # express the regexp above with the code you wish you had
end

Any Ideas?

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

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

发布评论

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

评论(1

夜光 2024-09-16 09:56:06

使用pickle 0.4后。错误已解决。

After using pickle 0.4. Error was solved.

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