使用 Stephen Celis 配置应用程序运行 Cucumber 时出现问题

发布于 2024-08-06 16:46:44 字数 512 浏览 2 评论 0原文

我正在尝试使用我在 Rails 中使用的配置应用程序启动并运行 Cucumber。

配置应用程序用于在 Rails 中设置各种配置选项,例如 ActiveResource 的站点值:

self.site = "http://#{App['domain']}#{App['path']}"

当我运行“cucumber features”时,我会收到一个错误,

bad URI(absolute but no path): http:// (URI::InvalidURIError)

我假设这是因为 cucumber 没有填充 self.site 字段在运行之前使用配置 gem 中的值。我已将配置 gem 包含在我的测试环境中,但没有任何运气。

我应该从这里去哪里?

原始应用程序配置 gem 位于此处:

http://github.com/stephencelis/app

I'm trying to get cucumber up and running with a config app I use in Rails.

The config app is used to set various config options in Rails, for example the site value for ActiveResource:

self.site = "http://#{App['domain']}#{App['path']}"

When I run "cucumber features", I can get an error

bad URI(absolute but no path): http:// (URI::InvalidURIError)

I'm assuming this is because cucumber is not populating that self.site field with values from the config gem before it runs. I've included the config gem in my test environment but have not had any luck.

Where should I go from here?

The original app config gem is located here:

http://github.com/stephencelis/app

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

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

发布评论

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

评论(1

请恋爱 2024-08-13 16:46:44

我没有使用过这个 gem,但注意到你说你在“测试环境”中包含了配置 gem。如果您还没有这样做,您应该确保在 config/environments/cucumber.rb 文件中也执行相同的操作。这可能不是您的问题,但我过去曾多次看到人们在测试与黄瓜环境中被绊倒。

I have not used this gem, but did notice that you said you included the config gem in your "test environment." If you haven't already done so, you should make sure you do the same in the config/environments/cucumber.rb file as well. This might not be your issues, but I've seen people get tripped on test versus cucumber environments several times in the past.

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