minitest-spec-rails 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75eddf946debf7b03677128371dbd8ee063d8e1977a5e29cb2fee6da332cc1eb
4
- data.tar.gz: 6573b0a84d2e8a80b1256aa6ce6abc066bfea1e0c080abaaf594285a38c4864b
3
+ metadata.gz: bd608dc91592fbd4710716a0902357700efbbc2bee50d1cff9694ca9b2b24b1c
4
+ data.tar.gz: 3f2b81d1e61293c182f9191fdcc9c14d3a50354cd2261f812374ec62cefbae2e
5
5
  SHA512:
6
- metadata.gz: 304f971b4d656d9a00649494aecb4784ee7477b4f60ff02008f68b59f6932ca33f1fbf1c332123f825cb1511b10056c40beafd308840e9012358a2b5f0e90bac
7
- data.tar.gz: ce907f266e7e9ce2e3a59c604853d44b03ef89ff6bf2289108ef3101b4b6e374710e470c8091b83ae30514d56f76c9f90fb09ea38f224edf8be34109f460ed54
6
+ metadata.gz: f19c19d4c3d3a8aeda7e3d145a8f79b5319d2238d5ccd96e215ba8141e9fce3b6d6d7a9cb54cb7fe05940ebef74ca2b5da6b9887b4860019493248f906001479
7
+ data.tar.gz: 13c4033a794e08d74d65194da33d84511e3502b66a30154b7fe41db3a70da8d3369cc27f1f6ebbe6c58f9f8c0a5516ccfcb3971d84c9c4c279425180f2ca962a
@@ -18,17 +18,18 @@ jobs:
18
18
  - name: Setup System
19
19
  run: |
20
20
  sudo apt-get install libsqlite3-dev
21
+ echo "::set-env name=MTSR_RAILS_VERSION::${{ matrix.rails }}"
21
22
  - name: Setup Ruby
22
23
  uses: actions/setup-ruby@v1
23
24
  with:
24
25
  ruby-version: ${{ matrix.ruby }}
25
26
  - name: Bundle
26
- env:
27
- MTSR_RAILS_VERSION: ${{ matrix.rails }}
28
27
  run: |
29
28
  export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
30
29
  gem uninstall -aIx bundler
31
30
  gem install bundler -v 1.17.3
32
31
  bundle install --jobs 4 --retry 3
33
32
  - name: Test
34
- run: bundle exec rake
33
+ run: |
34
+ export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
35
+ bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 6.0.2
2
+
3
+ * Fixed parallel tests in Rails v6.
4
+
1
5
  ## 6.0.1
2
6
 
3
7
  * Changed gemspec to `railties` vs `rails`. Thanks @seuros
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- minitest-spec-rails (6.0.1)
4
+ minitest-spec-rails (6.0.2)
5
5
  minitest (>= 5.0)
6
6
  railties (>= 4.1)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- minitest-spec-rails (6.0.1)
4
+ minitest-spec-rails (6.0.2)
5
5
  minitest (>= 5.0)
6
6
  railties (>= 4.1)
7
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- minitest-spec-rails (6.0.1)
4
+ minitest-spec-rails (6.0.2)
5
5
  minitest (>= 5.0)
6
6
  railties (>= 4.1)
7
7
 
@@ -0,0 +1,30 @@
1
+
2
+ # HACK: stolen and altered from https://github.com/blowmage/minitest-rails/pull/218/files
3
+ # Which was referenced in https://github.com/metaskills/minitest-spec-rails/issues/94
4
+
5
+ module MiniTestSpecRails
6
+ ##
7
+ # This module is a placeholder for all the Test classes created using the
8
+ # spec DSL. Normally all classes are created but not assigned to a constant.
9
+ # This module is where constants will be created for these classes.
10
+ module SpecTests #:nodoc:
11
+ end
12
+ end
13
+
14
+ module Kernel #:nodoc:
15
+ alias describe_before_minitest_spec_constant_fix describe
16
+ private :describe_before_minitest_spec_constant_fix
17
+ def describe *args, &block
18
+ cls = describe_before_minitest_spec_constant_fix(*args, &block)
19
+ cls_const = "Test__#{cls.name.to_s.split(/\W/).reject(&:empty?).join('_'.freeze)}"
20
+ if block.source_location
21
+ source_path, line_num = block.source_location
22
+ source_path = Pathname.new(source_path).relative_path_from(Rails.root).to_s
23
+ source_path = source_path.split(/\W/).reject(&:empty?).join("_".freeze)
24
+ cls_const += "__#{source_path}__#{line_num}"
25
+ end
26
+ cls_const += "_1" while MiniTestSpecRails::SpecTests.const_defined? cls_const
27
+ MiniTestSpecRails::SpecTests.const_set cls_const, cls
28
+ cls
29
+ end
30
+ end
@@ -7,6 +7,7 @@ module MiniTestSpecRails
7
7
  config.before_initialize do |_app|
8
8
  require 'active_support'
9
9
  require 'minitest-spec-rails/init/active_support'
10
+ require 'minitest-spec-rails/parallelize'
10
11
  ActiveSupport.on_load(:action_controller) do
11
12
  require 'minitest-spec-rails/init/action_controller'
12
13
  require 'minitest-spec-rails/init/action_dispatch'
@@ -1,3 +1,3 @@
1
1
  module MiniTestSpecRails
2
- VERSION = '6.0.1'.freeze
2
+ VERSION = '6.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-spec-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2020-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -114,6 +114,7 @@ files:
114
114
  - lib/minitest-spec-rails/init/active_job.rb
115
115
  - lib/minitest-spec-rails/init/active_support.rb
116
116
  - lib/minitest-spec-rails/init/mini_shoulda.rb
117
+ - lib/minitest-spec-rails/parallelize.rb
117
118
  - lib/minitest-spec-rails/railtie.rb
118
119
  - lib/minitest-spec-rails/version.rb
119
120
  - minitest-spec-rails.gemspec
@@ -170,8 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  - !ruby/object:Gem::Version
171
172
  version: '0'
172
173
  requirements: []
173
- rubyforge_project:
174
- rubygems_version: 2.7.6.2
174
+ rubygems_version: 3.0.1
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: Make Rails Use MiniTest::Spec!