minitest-spec-rails 4.7.7 → 4.7.8

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: 35f62ec9121838339c8f1d82c0d2287d2582400f
4
+ data.tar.gz: 8a5710e1ab6a2654a7dd53246b0e9eb4dd4ce104
5
+ SHA512:
6
+ metadata.gz: 3cbc982d9453b233a85f7b891128c154c992e564758b47d7daf6533de7122a46435a6fb59ef282200836c1a9d9cb6d8c1273fba844ad8fe8403f62678893b6f5
7
+ data.tar.gz: 1701ec40861b3c13a1dba63156da909608152571d8c14f9f8ab1b6d4226f4f5cafc9f36601ee64d709c3e281a816044604ec66c1de7287b4a099833be68a9141
data/.travis.yml CHANGED
@@ -1,11 +1,13 @@
1
1
  rvm:
2
2
  - 1.9.3
3
3
  - 2.0.0
4
+ - 2.1.1
4
5
  install:
5
6
  - gem install bundler
6
- - gem install rake
7
- - gem install appraisal
7
+ - bundle --version
8
+ - bundle install
8
9
  before_script:
9
- - rake appraisal:setup
10
+ - bundle exec appraisal update
10
11
  script:
11
- - rake appraisal test
12
+ - bundle exec appraisal rake test
13
+
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.7.8
2
+
3
+ * Change initialization so that ActiveSupport always comes first. Fixes #63.
1
4
 
2
5
  ## 4.7.7
3
6
 
data/README.md CHANGED
@@ -87,7 +87,7 @@ end
87
87
  Just for reference, here is a full list of each of Rails test case classes and the matching describe alternative if one exists. Remember, names are important when using the describe syntax. So you can not have a mailer named `FooBar` and expect it to work with the outer describe spec style since there is no way to map the spec type based on an existing naming convention.
88
88
 
89
89
  ```ruby
90
- # Model Test
90
+ # Model Test (or anything else not listed below)
91
91
  class UserTest < ActiveSupport::TestCase
92
92
  end
93
93
  describe User do
@@ -144,22 +144,22 @@ Rails ActiveSupport::TestCase allows multiple setup and teardown methods per cla
144
144
 
145
145
  ```ruby
146
146
  class ActiveSupportCallbackTest < ActiveSupport::TestCase
147
-
147
+
148
148
  setup :foo
149
149
  setup :bar
150
150
  before { @bat = 'biz' }
151
-
151
+
152
152
  it 'works' do
153
153
  @foo.must_equal 'foo'
154
154
  @bar.must_equal 'bar'
155
155
  @bat.must_equal 'biz'
156
156
  end
157
-
157
+
158
158
  private
159
-
159
+
160
160
  def foo ; @foo = 'foo' ; end
161
161
  def bar ; @bar = 'bar' ; end
162
-
162
+
163
163
  end
164
164
  ```
165
165
 
@@ -246,20 +246,26 @@ end
246
246
 
247
247
  ## Contributing
248
248
 
249
- The minitest-spec-rails gem is fully tested for minor Rails 3.x versions. We run our tests on [Travis CI](http://travis-ci.org/metaskills/minitest-spec-rails) in both Ruby 1.8 and 1.9. If you detect a problem, open up a github issue or fork the repo and help out. After you fork or clone the repository, the following commands will get you up and running on the test suite.
249
+ We run our tests on [Travis CI](http://travis-ci.org/metaskills/minitest-spec-rails). If you detect a problem, open up a github issue or fork the repo and help out. After you fork or clone the repository, the following commands will get you up and running on the test suite.
250
250
 
251
251
  ```shell
252
252
  $ bundle install
253
- $ bundle exec rake appraisal:setup
254
- $ bundle exec rake appraisal test
253
+ $ bundle exec appraisal update
254
+ $ bundle exec appraisal rake test
255
255
  ```
256
256
 
257
- We use the [appraisal](https://github.com/thoughtbot/appraisal) gem from Thoughtbot to help us generate the individual gemfiles for each Rails version and to run the tests locally against each generated Gemfile. The `rake appraisal test` command actually runs our test suite against all Rails versions in our `Appraisal` file. If you want to run the tests for a specific Rails version, use `rake -T` for a list. For example, the following command will run the tests for Rails 3.2 only.
257
+ We use the [appraisal](https://github.com/thoughtbot/appraisal) gem from Thoughtbot to help us generate the individual gemfiles for each Rails version and to run the tests locally against each generated Gemfile. The `rake appraisal test` command actually runs our test suite against all Rails versions in our `Appraisal` file. If you want to run the tests for a specific Rails version, use `bundle exec appraisal -h` for a list. For example, the following command will run the tests for Rails 4.1 only.
258
258
 
259
259
  ```shell
260
- $ bundle exec rake appraisal:rails32 test
260
+ $ bundle exec appraisal rails40 rake test
261
261
  ```
262
262
 
263
+ We have a few branches for each major Rails version.
264
+
265
+ * [2-3-stable](https://github.com/metaskills/minitest-spec-rails/tree/2-3-stable) - Tracks Rails 2.3.x with MiniTest 4.x.
266
+ * [3-x-stable](https://github.com/metaskills/minitest-spec-rails/tree/3-x-stable) - Oddly tracks Rails 3.x and 4.0 with MiniTest 4.x.
267
+ * master - Currently tracks Rails 4.1 which uses Minitest 5.0.
268
+
263
269
  Our current build status is:
264
270
  [![Build Status](https://secure.travis-ci.org/metaskills/minitest-spec-rails.png)](http://travis-ci.org/metaskills/minitest-spec-rails)
265
271
 
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rake/testtask'
4
- require 'appraisal'
5
4
 
6
5
  Rake::TestTask.new do |t|
7
6
  t.libs = ['lib','test']
@@ -11,9 +10,3 @@ end
11
10
 
12
11
  task :default => :test
13
12
 
14
- desc "Setup Appraisal."
15
- task 'appraisal:setup' do
16
- Rake::Task['appraisal:cleanup'].invoke
17
- Rake::Task['appraisal:gemfiles'].invoke
18
- Rake::Task['appraisal:install'].invoke
19
- end
@@ -1,15 +1,12 @@
1
1
  module MiniTestSpecRails
2
2
  class Railtie < ::Rails::Railtie
3
-
3
+
4
4
  config.minitest_spec_rails = ActiveSupport::OrderedOptions.new
5
5
  config.minitest_spec_rails.mini_shoulda = false
6
-
6
+
7
7
  config.before_initialize do |app|
8
8
  if Rails.env.test?
9
- ActiveSupport.on_load(:action_view) do
10
- require 'minitest-spec-rails/init/action_view'
11
- end
12
- ActiveSupport.on_load(:action_controller) do
9
+ ActiveSupport.on_load(:action_controller) do
13
10
  require 'minitest-spec-rails/init/action_controller'
14
11
  require 'action_dispatch/testing/integration' # For Rails 3.0 loading.
15
12
  require 'minitest-spec-rails/init/action_dispatch'
@@ -20,12 +17,16 @@ module MiniTestSpecRails
20
17
  end
21
18
  end
22
19
 
20
+ initializer 'minitest-spec-rails.action_view', :after => 'action_view.setup_action_pack', :group => :all do |app|
21
+ require 'minitest-spec-rails/init/action_view'
22
+ end if Rails.env.test?
23
+
23
24
  initializer 'minitest-spec-rails.after.load_active_support', :after => :load_active_support, :group => :all do |app|
24
25
  if Rails.env.test?
25
26
  require 'minitest-spec-rails/init/mini_shoulda' if app.config.minitest_spec_rails.mini_shoulda
26
27
  require 'minitest/autorun'
27
28
  end
28
29
  end
29
-
30
+
30
31
  end
31
32
  end
@@ -1,3 +1,3 @@
1
1
  module MiniTestSpecRails
2
- VERSION = "4.7.7"
2
+ VERSION = "4.7.8"
3
3
  end
metadata CHANGED
@@ -1,134 +1,119 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-spec-rails
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 4.7.7
4
+ version: 4.7.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ken Collins
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-05-30 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: minitest
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ~>
17
+ - - "~>"
19
18
  - !ruby/object:Gem::Version
20
19
  version: '4.7'
21
- none: false
20
+ type: :runtime
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: '4.7'
27
- none: false
28
- prerelease: false
29
- type: :runtime
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
30
  requirements:
34
- - - ! '>='
31
+ - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: '3.0'
37
- - - <
34
+ - - "<"
38
35
  - !ruby/object:Gem::Version
39
36
  version: '4.1'
40
- none: false
37
+ type: :runtime
38
+ prerelease: false
41
39
  version_requirements: !ruby/object:Gem::Requirement
42
40
  requirements:
43
- - - ! '>='
41
+ - - ">="
44
42
  - !ruby/object:Gem::Version
45
43
  version: '3.0'
46
- - - <
44
+ - - "<"
47
45
  - !ruby/object:Gem::Version
48
46
  version: '4.1'
49
- none: false
50
- prerelease: false
51
- type: :runtime
52
47
  - !ruby/object:Gem::Dependency
53
48
  name: appraisal
54
49
  requirement: !ruby/object:Gem::Requirement
55
50
  requirements:
56
- - - ! '>='
51
+ - - ">="
57
52
  - !ruby/object:Gem::Version
58
53
  version: '0'
59
- none: false
54
+ type: :development
55
+ prerelease: false
60
56
  version_requirements: !ruby/object:Gem::Requirement
61
57
  requirements:
62
- - - ! '>='
58
+ - - ">="
63
59
  - !ruby/object:Gem::Version
64
60
  version: '0'
65
- none: false
66
- prerelease: false
67
- type: :development
68
61
  - !ruby/object:Gem::Dependency
69
62
  name: bundler
70
63
  requirement: !ruby/object:Gem::Requirement
71
64
  requirements:
72
- - - ! '>='
65
+ - - ">="
73
66
  - !ruby/object:Gem::Version
74
67
  version: '0'
75
- none: false
68
+ type: :development
69
+ prerelease: false
76
70
  version_requirements: !ruby/object:Gem::Requirement
77
71
  requirements:
78
- - - ! '>='
72
+ - - ">="
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
81
- none: false
82
- prerelease: false
83
- type: :development
84
75
  - !ruby/object:Gem::Dependency
85
76
  name: guard-minitest
86
77
  requirement: !ruby/object:Gem::Requirement
87
78
  requirements:
88
- - - ! '>='
79
+ - - ">="
89
80
  - !ruby/object:Gem::Version
90
81
  version: '0'
91
- none: false
82
+ type: :development
83
+ prerelease: false
92
84
  version_requirements: !ruby/object:Gem::Requirement
93
85
  requirements:
94
- - - ! '>='
86
+ - - ">="
95
87
  - !ruby/object:Gem::Version
96
88
  version: '0'
97
- none: false
98
- prerelease: false
99
- type: :development
100
89
  - !ruby/object:Gem::Dependency
101
90
  name: rake
102
91
  requirement: !ruby/object:Gem::Requirement
103
92
  requirements:
104
- - - ! '>='
93
+ - - ">="
105
94
  - !ruby/object:Gem::Version
106
95
  version: '0'
107
- none: false
96
+ type: :development
97
+ prerelease: false
108
98
  version_requirements: !ruby/object:Gem::Requirement
109
99
  requirements:
110
- - - ! '>='
100
+ - - ">="
111
101
  - !ruby/object:Gem::Version
112
102
  version: '0'
113
- none: false
114
- prerelease: false
115
- type: :development
116
103
  - !ruby/object:Gem::Dependency
117
104
  name: sqlite3
118
105
  requirement: !ruby/object:Gem::Requirement
119
106
  requirements:
120
- - - ! '>='
107
+ - - ">="
121
108
  - !ruby/object:Gem::Version
122
109
  version: '0'
123
- none: false
110
+ type: :development
111
+ prerelease: false
124
112
  version_requirements: !ruby/object:Gem::Requirement
125
113
  requirements:
126
- - - ! '>='
114
+ - - ">="
127
115
  - !ruby/object:Gem::Version
128
116
  version: '0'
129
- none: false
130
- prerelease: false
131
- type: :development
132
117
  description: The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL
133
118
  within your existing Rails 3 or 4 test suite.
134
119
  email:
@@ -137,8 +122,8 @@ executables: []
137
122
  extensions: []
138
123
  extra_rdoc_files: []
139
124
  files:
140
- - .gitignore
141
- - .travis.yml
125
+ - ".gitignore"
126
+ - ".travis.yml"
142
127
  - Appraisals
143
128
  - CHANGELOG.md
144
129
  - Gemfile
@@ -193,27 +178,26 @@ files:
193
178
  homepage: http://github.com/metaskills/minitest-spec-rails
194
179
  licenses:
195
180
  - MIT
181
+ metadata: {}
196
182
  post_install_message:
197
183
  rdoc_options: []
198
184
  require_paths:
199
185
  - lib
200
186
  required_ruby_version: !ruby/object:Gem::Requirement
201
187
  requirements:
202
- - - ! '>='
188
+ - - ">="
203
189
  - !ruby/object:Gem::Version
204
190
  version: '0'
205
- none: false
206
191
  required_rubygems_version: !ruby/object:Gem::Requirement
207
192
  requirements:
208
- - - ! '>='
193
+ - - ">="
209
194
  - !ruby/object:Gem::Version
210
195
  version: '0'
211
- none: false
212
196
  requirements: []
213
197
  rubyforge_project:
214
- rubygems_version: 1.8.25
198
+ rubygems_version: 2.4.2
215
199
  signing_key:
216
- specification_version: 3
200
+ specification_version: 4
217
201
  summary: Make Rails Use MiniTest::Spec!
218
202
  test_files:
219
203
  - test/cases/action_controller_test.rb