sus 0.9.1 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91a7f4c78628a0b0dd8486ac342ce0719f54a53b39915ebcc782870dc8e35d49
4
- data.tar.gz: e81aaca35038343af7caae894d9b1e03cb75ea34efbd6a68ddcf901426f26097
3
+ metadata.gz: 514f648fd1bd5831f2265f423e317d00d98bcc7a1b61077a67116712caa276a3
4
+ data.tar.gz: 65098f09cdbe0d6cfcd4e08041bdcadd5eb4737f387aadc238bcd9152fd678e3
5
5
  SHA512:
6
- metadata.gz: fe9d621882e49b0d320bf7e3e4cdc415d08b2318c09756274f5c9ad1ae60f3914a794418485330e6f99611672c23b348815a8b07f6cb524aa32852b9314f81d0
7
- data.tar.gz: 78bd614fb8aa7f6a8ae1d2d2db59958cf12851a0d3f2f199a1737b1f4255e72d1958b40de37c489b29065d7535ef9adb244c43fe57bc5bdc241498b8b3e398b3
6
+ metadata.gz: 534b1cbaff030deb16445d0c2a46059b664e8bbb207a2d4539eda3865b27ce219e58c1797b16f787e480564d54e0d1f3984d5c2d60ef70884030ef768ba41dc1
7
+ data.tar.gz: 347b61af35c3100524499c430b39bfac69576afd334c1abcf7030ca67fdabb318051f4b8fc5ad5d364da21335844ae9bfee8e36cbcadd2df075fdc8b62e26a1c
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sus/base.rb CHANGED
@@ -1,6 +1,5 @@
1
1
 
2
2
  require_relative 'context'
3
- require_relative 'loader'
4
3
 
5
4
  module Sus
6
5
  # The base test case class. We need to be careful about what local state is stored.
data/lib/sus/config.rb CHANGED
@@ -22,7 +22,6 @@
22
22
 
23
23
  require_relative 'clock'
24
24
  require_relative 'registry'
25
- require_relative 'loader'
26
25
 
27
26
  module Sus
28
27
  class Config
@@ -58,6 +57,21 @@ module Sus
58
57
  @verbose = verbose
59
58
 
60
59
  @clock = Clock.new
60
+
61
+ self.add_default_load_paths
62
+ end
63
+
64
+ def add_load_path(path)
65
+ path = ::File.expand_path(path, @root)
66
+
67
+ if ::File.directory?(path)
68
+ $LOAD_PATH.unshift(path)
69
+ end
70
+ end
71
+
72
+ def add_default_load_paths
73
+ add_load_path('lib')
74
+ add_load_path('fixtures')
61
75
  end
62
76
 
63
77
  attr :root
@@ -85,22 +99,9 @@ module Sus
85
99
  @registry ||= self.load_registry
86
100
  end
87
101
 
88
- def base
89
- Sus.base
90
- end
91
-
92
- def setup_base(base)
93
- base.extend(Loader)
94
-
95
- require_root = self.root
96
- base.define_singleton_method(:require_root) {require_root}
97
- end
98
-
99
102
  def load_registry
100
103
  registry = Sus::Registry.new
101
104
 
102
- self.setup_base(registry.base)
103
-
104
105
  if @paths&.any?
105
106
  registry = Sus::Filter.new(registry)
106
107
  @paths.each do |path|
data/lib/sus/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sus
4
- VERSION = "0.9.1"
4
+ VERSION = "0.10.0"
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -67,7 +67,6 @@ files:
67
67
  - lib/sus/it.rb
68
68
  - lib/sus/it_behaves_like.rb
69
69
  - lib/sus/let.rb
70
- - lib/sus/loader.rb
71
70
  - lib/sus/mock.rb
72
71
  - lib/sus/output.rb
73
72
  - lib/sus/output/backtrace.rb
metadata.gz.sig CHANGED
Binary file
data/lib/sus/loader.rb DELETED
@@ -1,11 +0,0 @@
1
- module Sus
2
- module Loader
3
- def require_library(path)
4
- require(::File.join(self.require_root, "lib", path))
5
- end
6
-
7
- def require_fixture(path)
8
- require(::File.join(self.require_root, "fixtures", path))
9
- end
10
- end
11
- end