ruby - 添加 gem 'rails-controller-testing' 的替代方法
问题描述
我正在尝试测试模板是否在请求测试中呈现(通过 Rspec),但我不希望添加 rails-controller-testing gem。还有其他选择吗?
expect(response).to render_template(:index) # add gem 'rails-controller-testing' to your Gemfile first.
解决方案
推荐阅读
- java - 将字符连接到字符串数组时获取“null”
- c++ - 如何在第一个节点线性链表c ++之后添加一个节点
- ubuntu - GtkDialog 映射没有临时父级。不鼓励这样做,Katalon Studio Linux (Beta GUI) 出现错误
- javascript - 使用 React Native 平面列表和粘性标题在行中渲染项目
- swift - 如何使用 swift 4 for mac os 应用程序提取和创建 .zip 文件?
- amazon - 我想用亚马逊支付快递方式检索送货地址
- spring - 在现有 Spring 过滤器中自定义 URL 模式
- go - 如何获得 dep 确保删除未使用的 Go 文件、依赖项或包
- matlab - 如何在 Matlab2018b 中将无人机图像数据集划分为训练和测试以及 Faster R CNN 的有效部分
- react-native - ReactNative:当我使用 react-native fcm 时应用程序崩溃