未定义的方法“bin_path”使用ironruby调用cucumber时出错

发布于 2024-08-03 23:59:19 字数 400 浏览 4 评论 0原文

过去 2 天,我刚刚踏上 BDD 浪潮……我对 Aslak Hellesoy 在 RSpec 上的 InfoQ 视频很感兴趣。特别是与语言无关的集成测试框架声明。所以我正在考虑使用 Cucumber 测试 .Net 应用程序,这似乎是 BDD 故事运行程序的最新化身。

按照 cukes.info 和 wiki 页面上的示例来执行此操作。也安装了 IronRuby.. 然而最终结果有所不同,因为我得到了巨大的堆栈跟踪。

IronRuby 问题跟踪页面上发表了评论

该错误的 已解决此问题或知道发生了什么...请留下回复。谢谢。

Just riding on the BDD wave for the past 2 days.. I was intrigued with Aslak Hellesoy's InfoQ video on RSpec. Specifically with the language agnostic integration testing framework claims.. SO I was looking at testing a .Net app with Cucumber which seems to be the latest avatar of the BDD story runner.

Followed the examples on cukes.info and the wiki pages to do this. Installed IronRuby too..
However the end-result was different in that I get a huge stacktrace.

Posted a comment on the IronRuby Issue Tracking page for the bug

If anyone has worked around this or knows whats up... please leave a response. Thanks.

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

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

发布评论

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

评论(2

子栖 2024-08-10 23:59:19

昨天我与 IronRuby 和 Cucmber 一起工作。我没有解决您的 Codeplex 票证的方法,但这对我有用。

  1. 我在 c:\ironruby 中使用了 IronRuby 0.9,并使用从 DLR 更改集 27223 构建的 ir(我的机器上有这两个)。
  2. 我将 c:\ironruby\bin 添加到我的路径中,因此 cucumber.bat 可以找到 ir.exe。
  3. 我使用了 igem install rspec ,然后使用 igem install cucumber
  4. 我必须从我的 ruby​​ 安装中窃取 ruby​​gem 文件并将它们放入我的源文件中,以将 ruby​​gems 从 1.2 提升到 > > 1.3. igem update --system 不想为我工作。
  5. 然后,我强制安装了 hoe(一直失败)igem install hoe
  6. 此时,我编写了一个黄瓜功能,让步骤定义查看 White.Core.dll 来测试我的应用程序,并在 XP SP3 上成功运行c:\ironruby\lib\ironruby\gems\1.8\bin\cucumber --no-color features。 --no-color 标志很重要,否则您将在屏幕上看到终端代码。

如果可能的话,我会避免使用共享宝石模型。当我尝试这样做时,我感到很困惑,所以我选择了看起来最简单的方法。从 0.6 开始它就对我有用了。

I spent yesterday working with IronRuby and Cucmber. I don't have a solution to your codeplex ticket, but here's what worked for me.

  1. I used IronRuby 0.9 in c:\ironruby and with ir built from DLR change set 27223 (I have those two on my machine).
  2. I added c:\ironruby\bin to my path, so cucumber.bat can find ir.exe.
  3. I used igem install rspec followed by igem install cucumber
  4. I had to steal rubygem files from my ruby install and put them in my source files to bring rubygems up from 1.2 to > 1.3. igem update --system didn't want to work for me.
  5. I then forced an install of hoe (which had been failing) igem install hoe
  6. At that point, I wrote a cucumber feature, had the step definitions look at White.Core.dll to exercise my app under test, and ran c:\ironruby\lib\ironruby\gems\1.8\bin\cucumber --no-color features with success on XP SP3. The --no-color flag is important, or you'll get terminal codes all over the screen.

I avoid the shared gems model if at all possible. I got confused when I tried that, so I went with what seemed easiest. It's worked for me since 0.6.

沐歌 2024-08-10 23:59:19

JFYI - 经过一番与神秘错误的斗争之后,这个工作终于开始工作了。尽管根据 IronRuby 开发人员的说法,这个问题应该在下一个版本中得到修复,但从今天开始,在 0.9 版本中发布我的步骤以使其正常工作
http://madcoderspeak.blogspot.com/ 2009/09/testing-net-code-with-cucumber-and.html

JFYI - Got this working after a bit of thrashing about with cryptic errors. Although this is supposed to be fixed in the next release as per the IronRuby developers, Posting my steps to get this working as of today with the 0.9 release
http://madcoderspeak.blogspot.com/2009/09/testing-net-code-with-cucumber-and.html

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