rack-minitest 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 919627a1f82bf85fabed8d16c2cf4fffdcd7b963
4
- data.tar.gz: fc3cf654b7a6bb66df46b723bb5c6a55975bb4fe
3
+ metadata.gz: f819d45d2a7c07292be70f52dcc9c67f7d39762b
4
+ data.tar.gz: 1a13aa8b329dbb245aebe25661350d80a200fdd3
5
5
  SHA512:
6
- metadata.gz: 9d40e11992066e5ca7668ef775d6efb16a98d9736923c23a70a14f8591dac375ce6305d360a94cae7d783da74cc3c6614c8946651ae5973bef04625abed63a17
7
- data.tar.gz: 1a078d42498dc7845808675f65943e27833a1fd36a33dd04767cc172ed30c1be9cb36e0179bbed27538f67f586c8dd8b287673fe340122666261bda41c13d9e6
6
+ metadata.gz: c056f716d998fc19714ea12daf1c5c98bd9100be52ae64dd06839b2d9c25572154e9db5a7644f1c6ad12dfe75edda986e13ad533f17e265f2e0853986d412d5e
7
+ data.tar.gz: 1fb6170cb7539c421e5905e0ef751f73b308febcf0dffa6eea0c16ad50b5354d09c042c2318c0c3ec453d413199d0acdf69086d2e7bcc21d58e4ba8b27fabfb3
data/README.md CHANGED
@@ -18,6 +18,7 @@ last_response.must_be_no_content
18
18
  last_response.must_be_moved_permanently
19
19
  last_response.must_be_bad_request
20
20
  last_response.must_be_unauthorized
21
+ last_response.must_be_forbidden
21
22
  last_response.must_be_not_found
22
23
  last_response.must_be_unprocessable_entity
23
24
  last_response.must_be_internal_server_error
@@ -24,6 +24,10 @@ module MiniTest::Assertions
24
24
  assert_response_status response, 401
25
25
  end
26
26
 
27
+ def assert_forbidden(response)
28
+ assert_response_status response, 403
29
+ end
30
+
27
31
  def assert_not_found(response)
28
32
  assert_response_status response, 404
29
33
  end
@@ -48,6 +52,7 @@ Rack::MockResponse.infect_an_assertion :assert_no_content, :must_be_n
48
52
  Rack::MockResponse.infect_an_assertion :assert_moved_permanently, :must_be_moved_permanently, :only_one_argument
49
53
  Rack::MockResponse.infect_an_assertion :assert_bad_request, :must_be_bad_request, :only_one_argument
50
54
  Rack::MockResponse.infect_an_assertion :assert_unauthorized, :must_be_unauthorized, :only_one_argument
55
+ Rack::MockResponse.infect_an_assertion :assert_forbidden, :must_be_forbidden, :only_one_argument
51
56
  Rack::MockResponse.infect_an_assertion :assert_not_found, :must_be_not_found, :only_one_argument
52
57
  Rack::MockResponse.infect_an_assertion :assert_unprocessable_entity, :must_be_unprocessable_entity, :only_one_argument
53
58
  Rack::MockResponse.infect_an_assertion :assert_internal_server_error, :must_be_internal_server_error, :only_one_argument
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Minitest
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -48,6 +48,13 @@ describe MiniTest::Spec do
48
48
  last_response.must_be_unauthorized
49
49
  end
50
50
 
51
+ it "should have a spec-style matcher for a forbidden response" do
52
+ def app; stub_app(403); end
53
+
54
+ get "/"
55
+ last_response.must_be_forbidden
56
+ end
57
+
51
58
  it "should have a spec-style matcher for a not found response" do
52
59
  def app; stub_app(404); end
53
60
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Weiss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-05 00:00:00.000000000 Z
11
+ date: 2013-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json