为什么 content_for html 没有在 page.html 中呈现?
我正在尝试测试在访问的控制器操作视图中在 content_for 中呈现的选择器。
我注意到,当我调试 page.html 时,我看不到通过 content_for 渲染到产量中的内容,相反,我只看到最初位于 application.html.haml 中的 html。
是否需要等待页面完全加载? 我正在使用: let(:page_view) { Capybara::Node::Simple.new(@response.body) }
有什么想法吗?
I am trying to test a selector that is rendered within content_for in the view of visited controller action.
What I've noticed is that when I debug page.html, I don't see the content that is rendered into yields via content_for, instead, I see only the html that is originally in the application.html.haml.
Is it a matter of waiting for page to get fully loaded ?
I am using:
let(:page_view) { Capybara::Node::Simple.new(@response.body) }
Any idea please ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你有进入你的班级吗
Do you have into you class