README.md in rspec-rails-api-0.7.0 vs README.md in rspec-rails-api-0.8.0
- old
+ new
@@ -4,11 +4,13 @@
> documentation
**This is a work in progress** but you're welcome to help, test, submit
issues, ...
-**Note** For Rails 5, use version 0.2.3
+**Note**
+- For Rails 5, use version 0.2.3
+- For Rails 6/ruby 2.7, use version 0.7
## Installation
Add this line to your application's Gemfile:
@@ -77,10 +79,14 @@
```rb
# Server URL for quick reference
server_url = 'https://example.com'
+# Optional custom expected content type; default is "application/json; charset=utf-8".
+# Note that rails adds the charset in the header.
+# RSpec::Rails::Api::Metadata.default_expected_content_type = "application/json+custom; charset=utf-8"
+
# Options here should be present for a valid OpenAPI file
renderer.api_title = 'MyProject API'
renderer.api_version = '1'
# Options below are optional
@@ -544,10 +550,10 @@
#...
end
```
-##### `for_code(http_status, description = nil, test_only: false &block)`
+##### `for_code(http_status, description = nil, test_only: false, with_content_type: nil &block)`
Describes the desired output for a precedently defined URL.
Block takes one required argument, that should be passed to `test_response_of`.
This argument will contain the block context and allow `test_response_of` to access