minitest-spec-rails 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ ## v3.1.2
3
+
4
+ * Register non ActiveRecord::Base classes correctly. Thanks @mptre.
5
+
6
+
2
7
  ## v3.1.1
3
8
 
4
9
  * Only use a TU shim for Ruby 1.8. See README for info.
@@ -6,7 +6,7 @@ module MiniTestSpecRails
6
6
  klass.class_eval do
7
7
  extend MiniTest::Spec::DSL
8
8
  include MiniTestSpecRails::DSL
9
- register_spec_type(self) { |desc| Class === desc && desc < ActiveRecord::Base if defined?(ActiveRecord::Base) }
9
+ register_spec_type(self) { |desc| Class === desc }
10
10
  register_rails_test_case self
11
11
  end
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module MiniTestSpecRails
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.2"
3
3
  end
@@ -5,4 +5,8 @@ class UsersController < ApplicationController
5
5
  render :layout => false
6
6
  end
7
7
 
8
+ def update
9
+ redirect_to users_url
10
+ end
11
+
8
12
  end
@@ -0,0 +1,2 @@
1
+ class Library
2
+ end
@@ -0,0 +1,16 @@
1
+ require 'test_helper_dummy'
2
+ require File.expand_path('../../dummy_app/lib/library', __FILE__)
3
+
4
+ class LibraryTest < ActiveSupport::TestCase
5
+ it 'reflects' do
6
+ describing_class.must_equal LibraryTest
7
+ described_class.must_equal Library
8
+ end
9
+ end
10
+
11
+ describe Library do
12
+ it 'reflects' do
13
+ described_class.must_equal Library
14
+ self.class.described_class.must_equal Library
15
+ end
16
+ end
@@ -9,6 +9,11 @@ module UsersControllerTests
9
9
  it 'works' do
10
10
  assert_select 'h1', "All #{User.count} Users"
11
11
  end
12
+
13
+ it 'redirects' do
14
+ put :update, :id => 0
15
+ assert_redirected_to users_url
16
+ end
12
17
 
13
18
  end
14
19
  end
metadata CHANGED
@@ -1,133 +1,136 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: minitest-spec-rails
3
- version: !ruby/object:Gem::Version
4
- hash: 1
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.2
5
5
  prerelease:
6
- segments:
7
- - 3
8
- - 1
9
- - 1
10
- version: 3.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ken Collins
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-03-19 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- prerelease: false
22
- type: :runtime
12
+ date: 2013-03-20 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: minitest
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 4
32
- - 7
33
- version: "4.7"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- prerelease: false
20
+ - !ruby/object:Gem::Version
21
+ version: '4.7'
37
22
  type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '4.7'
30
+ - !ruby/object:Gem::Dependency
38
31
  name: rails
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
34
+ requirements:
42
35
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 2
47
- - 3
48
- - 0
36
+ - !ruby/object:Gem::Version
49
37
  version: 2.3.0
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
38
+ type: :runtime
52
39
  prerelease: false
53
- type: :development
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 2.3.0
46
+ - !ruby/object:Gem::Dependency
54
47
  name: guard-minitest
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
56
49
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
- version: "0"
64
- requirement: *id003
65
- - !ruby/object:Gem::Dependency
66
- prerelease: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
67
54
  type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
68
63
  name: minitest-emoji
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
70
65
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
76
- - 0
77
- version: "0"
78
- requirement: *id004
79
- - !ruby/object:Gem::Dependency
80
- prerelease: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
81
70
  type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
82
79
  name: minitest-focus
83
- version_requirements: &id005 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
84
81
  none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
- version: "0"
92
- requirement: *id005
93
- - !ruby/object:Gem::Dependency
94
- prerelease: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
95
86
  type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
96
95
  name: rake
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
98
97
  none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
104
- - 0
105
- version: "0"
106
- requirement: *id006
107
- - !ruby/object:Gem::Dependency
108
- prerelease: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
109
102
  type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
110
111
  name: sqlite3
111
- version_requirements: &id007 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
112
121
  none: false
113
- requirements:
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- hash: 3
117
- segments:
118
- - 0
119
- version: "0"
120
- requirement: *id007
121
- description: The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL within your existing Rails 3 or 4 test suite.
122
- email:
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description: The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL
127
+ within your existing Rails 3 or 4 test suite.
128
+ email:
123
129
  - ken@metaskills.net
124
130
  executables: []
125
-
126
131
  extensions: []
127
-
128
132
  extra_rdoc_files: []
129
-
130
- files:
133
+ files:
131
134
  - .gitignore
132
135
  - .travis.yml
133
136
  - CHANGELOG.md
@@ -171,6 +174,7 @@ files:
171
174
  - test/dummy_app/config/routes.rb
172
175
  - test/dummy_app/db/schema.rb
173
176
  - test/dummy_app/init.rb
177
+ - test/dummy_app/lib/library.rb
174
178
  - test/dummy_app/log/.keep
175
179
  - test/dummy_app/public/.htaccess
176
180
  - test/dummy_app/public/404.html
@@ -181,6 +185,7 @@ files:
181
185
  - test/dummy_tests/application_controller_test.rb
182
186
  - test/dummy_tests/foo_helper_test.rb
183
187
  - test/dummy_tests/integration_test.rb
188
+ - test/dummy_tests/library_test.rb
184
189
  - test/dummy_tests/user_mailer_test.rb
185
190
  - test/dummy_tests/user_test.rb
186
191
  - test/dummy_tests/users_controller_test.rb
@@ -191,38 +196,35 @@ files:
191
196
  - test/test_helper_dummy.rb
192
197
  homepage: http://github.com/metaskills/minitest-spec-rails
193
198
  licenses: []
194
-
195
199
  post_install_message:
196
200
  rdoc_options: []
197
-
198
- require_paths:
201
+ require_paths:
199
202
  - lib
200
- required_ruby_version: !ruby/object:Gem::Requirement
203
+ required_ruby_version: !ruby/object:Gem::Requirement
201
204
  none: false
202
- requirements:
203
- - - ">="
204
- - !ruby/object:Gem::Version
205
- hash: 3
206
- segments:
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ segments:
207
210
  - 0
208
- version: "0"
209
- required_rubygems_version: !ruby/object:Gem::Requirement
211
+ hash: -14675576919957165
212
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
213
  none: false
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- hash: 3
215
- segments:
214
+ requirements:
215
+ - - ! '>='
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ segments:
216
219
  - 0
217
- version: "0"
220
+ hash: -14675576919957165
218
221
  requirements: []
219
-
220
222
  rubyforge_project:
221
223
  rubygems_version: 1.8.25
222
224
  signing_key:
223
225
  specification_version: 3
224
226
  summary: Make Rails Use MiniTest::Spec!
225
- test_files:
227
+ test_files:
226
228
  - test/cases/action_controller_test.rb
227
229
  - test/cases/action_dispatch_test.rb
228
230
  - test/cases/action_mailer_test.rb
@@ -247,6 +249,7 @@ test_files:
247
249
  - test/dummy_app/config/routes.rb
248
250
  - test/dummy_app/db/schema.rb
249
251
  - test/dummy_app/init.rb
252
+ - test/dummy_app/lib/library.rb
250
253
  - test/dummy_app/log/.keep
251
254
  - test/dummy_app/public/.htaccess
252
255
  - test/dummy_app/public/404.html
@@ -257,6 +260,7 @@ test_files:
257
260
  - test/dummy_tests/application_controller_test.rb
258
261
  - test/dummy_tests/foo_helper_test.rb
259
262
  - test/dummy_tests/integration_test.rb
263
+ - test/dummy_tests/library_test.rb
260
264
  - test/dummy_tests/user_mailer_test.rb
261
265
  - test/dummy_tests/user_test.rb
262
266
  - test/dummy_tests/users_controller_test.rb