rack-minitest 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 919627a1f82bf85fabed8d16c2cf4fffdcd7b963
4
+ data.tar.gz: fc3cf654b7a6bb66df46b723bb5c6a55975bb4fe
5
+ SHA512:
6
+ metadata.gz: 9d40e11992066e5ca7668ef775d6efb16a98d9736923c23a70a14f8591dac375ce6305d360a94cae7d783da74cc3c6614c8946651ae5973bef04625abed63a17
7
+ data.tar.gz: 1a078d42498dc7845808675f65943e27833a1fd36a33dd04767cc172ed30c1be9cb36e0179bbed27538f67f586c8dd8b287673fe340122666261bda41c13d9e6
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in rack-minitest.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -14,9 +14,13 @@ delete_json path, params
14
14
 
15
15
  last_response.must_be_ok
16
16
  last_response.must_be_created
17
+ last_response.must_be_no_content
18
+ last_response.must_be_moved_permanently
19
+ last_response.must_be_bad_request
17
20
  last_response.must_be_unauthorized
18
21
  last_response.must_be_not_found
19
22
  last_response.must_be_unprocessable_entity
23
+ last_response.must_be_internal_server_error
20
24
  ```
21
25
 
22
26
  **NB**: This is a quick and dirty gem to hack in some functionality that I was surprised to find didn't already exist. There are tests, and they pass, but they're pretty gross. All improvements are welcome.
@@ -8,6 +8,10 @@ module MiniTest::Assertions
8
8
  assert_response_status response, 201
9
9
  end
10
10
 
11
+ def assert_no_content(response)
12
+ assert_response_status response, 204
13
+ end
14
+
11
15
  def assert_moved_permanently(response)
12
16
  assert_response_status response, 301
13
17
  end
@@ -40,6 +44,7 @@ end
40
44
 
41
45
  Rack::MockResponse.infect_an_assertion :assert_ok, :must_be_ok, :only_one_argument
42
46
  Rack::MockResponse.infect_an_assertion :assert_created, :must_be_created, :only_one_argument
47
+ Rack::MockResponse.infect_an_assertion :assert_no_content, :must_be_no_content, :only_one_argument
43
48
  Rack::MockResponse.infect_an_assertion :assert_moved_permanently, :must_be_moved_permanently, :only_one_argument
44
49
  Rack::MockResponse.infect_an_assertion :assert_bad_request, :must_be_bad_request, :only_one_argument
45
50
  Rack::MockResponse.infect_an_assertion :assert_unauthorized, :must_be_unauthorized, :only_one_argument
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Minitest
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -20,6 +20,13 @@ describe MiniTest::Spec do
20
20
  last_response.must_be_created
21
21
  end
22
22
 
23
+ it "should have a spec-style matcher for a no content response" do
24
+ def app; stub_app(204); end
25
+
26
+ get "/"
27
+ last_response.must_be_no_content
28
+ end
29
+
23
30
  it "should have a spec-style matcher for a moved permanently response" do
24
31
  def app; stub_app(301); end
25
32
 
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brandon Weiss
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 Z
11
+ date: 2013-06-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rack-test
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minitest
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: rack-minitest = rack-test + MiniTest
@@ -97,27 +88,26 @@ files:
97
88
  - test/test_helper.rb
98
89
  homepage: ''
99
90
  licenses: []
91
+ metadata: {}
100
92
  post_install_message:
101
93
  rdoc_options: []
102
94
  require_paths:
103
95
  - lib
104
96
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
97
  requirements:
107
- - - ! '>='
98
+ - - '>='
108
99
  - !ruby/object:Gem::Version
109
100
  version: '0'
110
101
  required_rubygems_version: !ruby/object:Gem::Requirement
111
- none: false
112
102
  requirements:
113
- - - ! '>='
103
+ - - '>='
114
104
  - !ruby/object:Gem::Version
115
105
  version: '0'
116
106
  requirements: []
117
107
  rubyforge_project:
118
- rubygems_version: 1.8.23
108
+ rubygems_version: 2.0.0
119
109
  signing_key:
120
- specification_version: 3
110
+ specification_version: 4
121
111
  summary: rack-minitest = rack-test + MiniTest
122
112
  test_files:
123
113
  - test/assertions_test.rb