【文件属性】:
文件名称:jsonapi-rspec:JSON的RSpec匹配器
文件大小:15KB
文件格式:ZIP
更新时间:2021-05-02 00:40:11
Ruby
jsonapi-rspec
RSpec匹配器。
安装
将以下内容添加到应用程序的Gemfile中:
gem 'jsonapi-rspec'
然后执行:
$ bundle
添加到您的spec/spec_helpers.rb :
# spec/spec_helpers.rb
require 'jsonapi/rspec'
RSpec . configure do | config |
config . include JSONAPI :: RSpec
# Support for documents with mixed string/symbol keys. Disabled by default.
config . jsonapi_indifferent_hash = true
end
用法和文件
可用的匹配器:
expect(document['data']).to
【文件预览】:
jsonapi-rspec-master
----.gitignore(16B)
----jsonapi-rspec.gemspec(831B)
----.rubocop.yml(309B)
----LICENSE(1KB)
----.github()
--------PULL_REQUEST_TEMPLATE.md(516B)
--------ISSUE_TEMPLATE.md(145B)
--------workflows()
----spec()
--------spec_helper.rb(553B)
--------jsonapi()
----README.md(3KB)
----VERSION(7B)
----lib()
--------jsonapi()
----Gemfile(39B)
----Rakefile(185B)