- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我假设 ActionController::TestCase
仅用于测试 ActionControllers
,但什么是 ActiveSupport::TestCase
测试?它是否测试所有内容(模型、 View 和 Controller )?这些类(class)中的一个或两个是否过时/过时?我想我更喜欢坚持使用股票 RoR 测试方式,而不是与其他 gem 等混淆。我是 Ruby on Rails 和 TDD 的新手。
最佳答案
ActionController::TestCase 是为测试 Controller 而设计的,所以它有专门的测试 Controller 的方法。
ActiveSupport::TestCase 设计用于测试模型。
这些类有 api
http://api.rubyonrails.org/classes/ActionController/TestCase.html
http://api.rubyonrails.org/classes/ActiveSupport/TestCase.html
关于ruby-on-rails - ActionController::TestCase 与 ActiveSupport::TestCase;究竟有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8141957/
Feel free to skip straight to TL/DR if you're not interested in details of the question 简短的序言: 我最近决定
我一直在阅读 A Tour of Go学习Go-Lang到目前为止一切顺利。 我目前在 Struct Fields类(class),这是右侧的示例代码: package main import "fm
Last time I got confused顺便说一下PowerShell急切地展开集合,基思总结了它的启发式如下: Putting the results (an array) within a
我是一名优秀的程序员,十分优秀!