rack-test-accepts 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +13 -0
- data/lib/rack/test/accepts/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
Helpers for rack-test that mean I don't need to remember the accept header syntax, or whether to prepend HTTP to them.
|
4
4
|
|
5
|
+
### Build status ###
|
6
|
+
|
7
|
+
Master branch:
|
8
|
+
[](https://travis-ci.org/yb66/rack-test-accepts)
|
9
|
+
|
5
10
|
## Why? ##
|
6
11
|
|
7
12
|
Just to make life a bit easier.
|
@@ -37,6 +42,14 @@ then:
|
|
37
42
|
post '/channel/create', body, env(:accepts_json)
|
38
43
|
end
|
39
44
|
|
45
|
+
It will work for any of the mime types listed in [Rack::Mime::MIME_TYPES](https://github.com/rack/rack/blob/master/lib/rack/mime.rb#L54) e.g.
|
46
|
+
|
47
|
+
get "/", {}, env(:accepts_zip)
|
48
|
+
put "/", {}, env(:accepts_xml)
|
49
|
+
delete "/", {}, env(:accepts_asm)
|
50
|
+
|
51
|
+
or whichever crazy format your routes want to accept.
|
52
|
+
|
40
53
|
## Contributing
|
41
54
|
|
42
55
|
1. Fork it
|