简体   繁体   English

有没有办法在 Ruby-on-Rails rspec 请求测试中检查页面渲染?

[英]Is there any way to check page-rendering in Ruby-on-Rails rspec request test?

I'm trying to test my ROR application, but I can't check page's rendering without gem.我正在尝试测试我的 ROR 应用程序,但如果没有 gem,我无法检查页面的渲染。 I can only find out .to include method and check element.我只能找出.to include方法和检查元素。 Is there any way I can check view rendering without installing gem?有什么方法可以在不安装 gem 的情况下检查视图渲染?

Is only way to use capybara gem to screenshot you html pages with:是使用 capybara gem 截取 html 页面的唯一方法:

page.save_screenshot('screen.png', full: true)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM