黄瓜泡菜、机械师和 Mongoid
我正在使用带有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用pickle 0.4后。错误已解决。
After using pickle 0.4. Error was solved.