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 +4 -4
- data/.github/workflows/ci.yml +4 -3
- data/CHANGELOG.md +4 -0
- data/gemfiles/rails_v5.1.x.gemfile.lock +1 -1
- data/gemfiles/rails_v5.2.x.gemfile.lock +1 -1
- data/gemfiles/rails_v6.0.x.gemfile.lock +1 -1
- data/lib/minitest-spec-rails/parallelize.rb +30 -0
- data/lib/minitest-spec-rails/railtie.rb +1 -0
- data/lib/minitest-spec-rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd608dc91592fbd4710716a0902357700efbbc2bee50d1cff9694ca9b2b24b1c
|
4
|
+
data.tar.gz: 3f2b81d1e61293c182f9191fdcc9c14d3a50354cd2261f812374ec62cefbae2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f19c19d4c3d3a8aeda7e3d145a8f79b5319d2238d5ccd96e215ba8141e9fce3b6d6d7a9cb54cb7fe05940ebef74ca2b5da6b9887b4860019493248f906001479
|
7
|
+
data.tar.gz: 13c4033a794e08d74d65194da33d84511e3502b66a30154b7fe41db3a70da8d3369cc27f1f6ebbe6c58f9f8c0a5516ccfcb3971d84c9c4c279425180f2ca962a
|
data/.github/workflows/ci.yml
CHANGED
@@ -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:
|
33
|
+
run: |
|
34
|
+
export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
|
35
|
+
bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -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'
|
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.
|
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:
|
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
|
-
|
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!
|