黄瓜和/或 Webrat 讨厌 ?
当
添加到我的布局中时,我有一个黄瓜步骤最近开始失败。 如果我取出
,我的测试就全部通过。 当我把它放回去时,每个使用 WebRat 提供的 click_link 方法的测试都会失败,并显示以下消息:
And he follows 'Unsubscribe'
incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)
(eval):3:in `click_link`
(eval):2:in `click_link`
/path_to_project/webrat_steps.rb:19:in `/^(I|he|she) follows? '([^\"]*)'$/'
features/manage_subscriptions.feature:59:in `And he follows 'Unsubscribe''
有人有任何建议吗?
I have a cucumber step that recently started failing when an
was added to my layout. If I take the
out, my tests all pass. When I put it back in, every test that uses the click_link method supplied by WebRat fails with the following message:
And he follows 'Unsubscribe'
incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)
(eval):3:in `click_link`
(eval):2:in `click_link`
/path_to_project/webrat_steps.rb:19:in `/^(I|he|she) follows? '([^\"]*)'$/'
features/manage_subscriptions.feature:59:in `And he follows 'Unsubscribe''
Does anyone have any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Ruby 1.9 和 Rails 2.3.2 下遇到了同样的问题,为了让它工作,我必须在 webrat gem 中进行以下更改。
在 lib/webrat/core/locators/link_locator.rb 中,我必须更改:
到
还有一个补丁提交给 webrat 票 260,但它对我不起作用,所以我不得不这样做以上。 希望这可以帮助。
I had the same problem under Ruby 1.9 and Rails 2.3.2, in order to get it working I had to make the following changes in the webrat gem.
In
lib/webrat/core/locators/link_locator.rb
I had to change:to
There was also a patch submited to webrat Ticket 260, but it did not work for me so I had to do the above. Hope this helps.