没有合适的资源?快使用搜索试试~ 我知道了~
schema_expectations
共44个文件
rb:22个
gemfile:10个
yml:2个
需积分: 9 0 下载量 14 浏览量
2021-06-21
17:40:03
上传
评论
收藏 29KB ZIP 举报
温馨提示
模式期望 允许您测试您的数据库架构是否与您的 ActiveRecord 模型中的验证匹配。 文档 您可以在找到文档 安装 将schema_expectations添加到您的 Gemfile 中: group :test do gem 'schema_expectations' end 与 RSpec 一起使用 验证唯一性约束 validate_schema_uniqueness匹配器测试 ActiveRecord 模型对具有数据库唯一性约束的列进行唯一性验证,反之亦然。 例如,我们可以断言,模型和数据库是否一致record_type和record_id应该是唯一的: create_table :records do | t | t . integer :record_type t . integer :record_id t . index [ :record_t
资源推荐
资源详情
资源评论
收起资源包目录
schema_expectations-master.zip (44个子文件)
schema_expectations-master
gemfiles
activerecord_3.2.gemfile 123B
default.gemfile 93B
activerecord_4.0.gemfile 123B
rspec_3.2.gemfile 116B
rspec_3.0.gemfile 116B
rspec_3.1.gemfile 116B
activerecord_4.1.gemfile 123B
activerecord_3.1.gemfile 123B
activerecord_4.2.gemfile 123B
MIT-LICENSE 1KB
.ruby-version 6B
lib
schema_expectations
rspec_matchers
base.rb 1KB
validate_schema_nullable.rb 4KB
validate_schema_uniqueness.rb 5KB
config.rb 358B
rspec.rb 150B
util.rb 226B
active_record
validation_reflector.rb 3KB
column_reflector.rb 3KB
rspec_matchers.rb 142B
version.rb 50B
schema_expectations.rb 181B
Gemfile 38B
Guardfile 231B
spec
db
database.yml 260B
meta_spec.rb 2KB
lib
schema_expectations
rspec_matchers
validate_schema_nullable_spec.rb 10KB
validate_schema_uniqueness_spec.rb 8KB
config_spec.rb 523B
active_record
column_reflector_spec.rb 7KB
validation_reflector_spec.rb 7KB
util_spec.rb 522B
spec_helper.rb 683B
support
active_record.rb 1KB
gem_filters.rb 229B
active_record_helpers.rb 2KB
Rakefile 585B
.travis.yml 422B
README.md 3KB
Appraisals 517B
.rspec 8B
.gitignore 62B
schema_expectations.gemspec 2KB
CHANGELOG.md 1KB
共 44 条
- 1
资源评论
HomeTalk
- 粉丝: 25
- 资源: 4588
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功