knapsack_pro 9.2.0 → 9.2.1
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/lib/knapsack_pro/adapters/minitest_adapter.rb +8 -5
- data/lib/knapsack_pro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c214021f95c75ade998199d051fde0a287ae357174f82fb9193833a70792ae76
|
|
4
|
+
data.tar.gz: 5987335be91251d6dba92a1656d981932172897bca175525db2e3421ad718775
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a47a53fb26eb3aba28c60045d13fda33fb00c6ea46321adb63986e662b74bc7b011097c2fbf90ec68a5be236cf06986a901b6ffef524864352d06d053dcbd962
|
|
7
|
+
data.tar.gz: f3210244a10fbd129649586d8ed09441bbb63202bfde66ca3bd1f997c235772cdb4891681b0b8a3918d204f18b4ad3c2522a25ed445bdb830a69423c09b695c2
|
|
@@ -10,15 +10,18 @@ module KnapsackPro
|
|
|
10
10
|
path, _line =
|
|
11
11
|
begin
|
|
12
12
|
Object.const_source_location(obj.class.to_s)
|
|
13
|
-
rescue NameError
|
|
14
|
-
|
|
15
|
-
obj.method(test_method_name).source_location
|
|
13
|
+
rescue NameError # Dynamically defined class (Minitest::Spec `describe "more words"`)
|
|
14
|
+
nil
|
|
16
15
|
end
|
|
16
|
+
|
|
17
|
+
if path.nil? # Dynamically defined class (Minitest::Spec `describe "oneword"`)
|
|
18
|
+
test_method_name = obj.class.runnable_methods.first
|
|
19
|
+
path, _line = obj.method(test_method_name).source_location
|
|
20
|
+
end
|
|
21
|
+
|
|
17
22
|
path.gsub(Regexp.new("^#{@@parent_of_test_dir}"), '.')
|
|
18
23
|
end
|
|
19
24
|
|
|
20
|
-
# See how to write hooks and plugins
|
|
21
|
-
# https://github.com/seattlerb/minitest/blob/master/lib/minitest/test.rb
|
|
22
25
|
module BindTimeTrackerMinitestPlugin
|
|
23
26
|
def before_setup
|
|
24
27
|
super
|
data/lib/knapsack_pro/version.rb
CHANGED