使用 Cucumber 测试 Authlogic Remember Me
有没有人尝试过用 Cucumber 测试 Authlogic“记住我”功能?我不知道如何让 webrat “关闭浏览器”来测试持久性。
唯一的想法是也许它需要硒?有没有办法不用呢?
Has anyone tried to test the Authlogic "Remember Me" functionality with Cucumber? I am not sure how to get webrat to "close a browser" to test persistence.
Only thought is maybe it requires selenium? Is there a way to do without?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Webrat 与 Rails 应用程序的通信比浏览器更直接(就像 Selenium 那样)。我会制作一个自定义匹配器,例如:
(然后)我应该被应用程序记住
然后我会检查数据库或会话,取决于authlogic如何处理此功能。
Webrat communicates with Rails app more directly than a browser(like Selenium does). I would make a custom matcher like:
(Then) I should be remembered by the application
And then I would check the db or the session, depends how the authlogic handles this feature.