没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > rails-test-plugin |
|
rails-test-plugin
|
| 0 | 0 | 0 |
| 贡献者 | 讨论 | 代码提交 |
概述
Test Plugin provides several handy facilities.
Fixtures for Code with No Underlying Model
It can be a bear to test code with no underlying model or with a model that is not contained in your primary database. That's because the fixtures, by default, populate the test database. Enter the brand new command:
no_db_fixtures :foos, :bars
Asserts for Any Predicate
It is more natural to use an assert of the form:
assert_include ['moo', 'goo', 'doo], @foo
or, more concretely
assert_include expected_email, email.to
Each of these is automagically created to utilize predicates in the Ruby language or in your own code. First the predicate? form is attempted, then simply predicate without the question mark.
创建时间:2014-05-12 08:34
标签:
