rack-minitest 0.0.9 → 0.0.10

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: 6215e515b7bdbb2383d5025631a57cac7d73a4c8
4
- data.tar.gz: 1e7fbb71c54b1215871c65ee45a3244e6288272f
3
+ metadata.gz: 8e1a4b49c874fda3e91f078740411d075bfee62f
4
+ data.tar.gz: 4bf8d9627b87a53dd74d83877464902f9ab134ea
5
5
  SHA512:
6
- metadata.gz: 1157a7f46098fbd12f08b877a1291b8ce51907ba89d6ea6fdb0fe9fcecb466a7dab50b3caeb44165797b9de9d5fb1980b6f996ddd4fa1a55bb4f69bfd9756ff0
7
- data.tar.gz: 8aba2ed83deae756c6b0f65a7fb1bdc7dfa99a78941aa7b20323d219b64f70611131a1e47fc9880f7005fd88f77fea185f2f34bb3c17c82895b27096c9c32687
6
+ metadata.gz: d5847ea59209b8fcae1abfcc27fb9184c319a0646d2d8cef734a34c309af39265eb3b249996d85cdb905db51984a4198288d41861e44cb303659d77b5bdd4ecb
7
+ data.tar.gz: 5e2185c4cc25d224be4ac4da154270055a82d860629edd7da721a38026a2ce076cbdd368f45574eb7f647e564cfe54c736ec92945567c4d16ede311b04036f26
data/README.md CHANGED
@@ -16,6 +16,7 @@ delete_json path, params, headers
16
16
  # assertions
17
17
  assert_ok
18
18
  assert_created
19
+ assert_accepted
19
20
  assert_no_content
20
21
  assert_moved_permanently
21
22
  assert_bad_request
@@ -28,6 +29,7 @@ assert_internal_server_error
28
29
  # matchers
29
30
  last_response.must_be_ok
30
31
  last_response.must_be_created
32
+ last_response.must_be_accepted
31
33
  last_response.must_be_no_content
32
34
  last_response.must_be_moved_permanently
33
35
  last_response.must_be_bad_request
@@ -10,6 +10,10 @@ module Rack
10
10
  assert_response_status response, 201
11
11
  end
12
12
 
13
+ def assert_accepted(response)
14
+ assert_response_status response, 202
15
+ end
16
+
13
17
  def assert_no_content(response)
14
18
  assert_response_status response, 204
15
19
  end
@@ -11,6 +11,7 @@ end
11
11
  class Rack::MockResponse
12
12
  infect_an_assertion :assert_ok, :must_be_ok, :only_one_argument
13
13
  infect_an_assertion :assert_created, :must_be_created, :only_one_argument
14
+ infect_an_assertion :assert_accepted, :must_be_accepted, :only_one_argument
14
15
  infect_an_assertion :assert_no_content, :must_be_no_content, :only_one_argument
15
16
  infect_an_assertion :assert_moved_permanently, :must_be_moved_permanently, :only_one_argument
16
17
  infect_an_assertion :assert_bad_request, :must_be_bad_request, :only_one_argument
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Minitest
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -22,6 +22,13 @@ describe Rack::Minitest::Assertions do
22
22
  assert_created(last_response)
23
23
  end
24
24
 
25
+ it "should have an assertion for an accepted response" do
26
+ def app; stub_app(202); end
27
+
28
+ get "/"
29
+ assert_accepted(last_response)
30
+ end
31
+
25
32
  it "should have an assertion for a no content response" do
26
33
  def app; stub_app(204); end
27
34
 
@@ -22,6 +22,13 @@ describe Rack::Minitest::Expectations do
22
22
  last_response.must_be_created
23
23
  end
24
24
 
25
+ it "should have a spec-style matcher for an accepted response" do
26
+ def app; stub_app(202); end
27
+
28
+ get "/"
29
+ last_response.must_be_accepted
30
+ end
31
+
25
32
  it "should have a spec-style matcher for a no content response" do
26
33
  def app; stub_app(204); end
27
34
 
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Weiss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-03 00:00:00.000000000 Z
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack-test
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '5.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: rack-minitest = rack-test + Minitest
@@ -73,7 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - LICENSE.txt
79
79
  - README.md
@@ -100,17 +100,17 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.2.0
113
+ rubygems_version: 2.4.2
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: rack-minitest = rack-test + Minitest