1. 首页
  2. 移动开发
  3. 其他
  4. json_spec:在RSpec和Cucumber中轻松处理JSON 源码

json_spec:在RSpec和Cucumber中轻松处理JSON 源码

上传者: 2021-04-03 12:45:32上传 ZIP文件 29.29KB 热度 25次
json_spec 在RSpec和Cucumber中轻松处理JSON 规范 json_spec定义了五个新的RSpec匹配器: be_json_eql include_json have_json_path have_json_type have_json_size 可以在RSpec中使用新的匹配器,如下所示: describe User do let ( :user ) { User . create! ( first_name : "Steve" , last_name : "Richert" ) } context "#to_json" do it "includes names" do names = %({"first_name":"Steve","last_name":"Richert"}) user . to_json
下载地址
用户评论