sus 0.5.1 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5223e3220b3a2fbc2263efd27ca457b971241eff48bb667f0a2235cc6de5c98c
4
- data.tar.gz: 2a6558d6a0cd06527115a569553ded158709b16be0125de5101fcf130ff753b4
3
+ metadata.gz: 7c8554b623c4d276847094ae5cf9a8c1dd1b7cac3b565f46286245a2156ec821
4
+ data.tar.gz: '084fa649a284b22409c02db6697ac4ae4ecb5c5077a1a22047d08622c96b54e3'
5
5
  SHA512:
6
- metadata.gz: 55acd565c40a26bdbb65abd4f8ae491fadcbb2cdab96f341a76f86ae19187beeac32ab562d497f77fb0e40d8ac2c711aeceb5d984b2f9d1b529f3c74d2579cfb
7
- data.tar.gz: d5872899a88f5e02125655773d57ba11930e31f106ef52c2e9b03d584e808cb761ac614bfc83270e94f7cb5c5aceff559dae9456732a39c38d87bf1e851d40ae
6
+ metadata.gz: 4f0da0e539bec7a5aec99ab7c44c3cc3ff5254a8997ab948d8cd374cbae86a1a96ada85d8d79df8f41e9da8aa0b9c303ba18979d7eda7eee4a0fd6acfb9ab7a5
7
+ data.tar.gz: 67252be753c86c97074e3dcf55a9ce8e45413a8a5f224fa1a8d6ddac82cc10c32d71d8d13e6df030925a70d0bdb7926c2424cc1005737a13f01cda6b08279e40
data/bin/sus CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  require_relative '../lib/sus'
4
4
 
5
+ if File.exist?("config/test.rb")
6
+ load("config/test.rb")
7
+ end
8
+
5
9
  def prepare(paths, registry)
6
10
  if paths&.any?
7
11
  paths.each do |path|
@@ -31,4 +35,6 @@ if assertions.failed.any?
31
35
  assertions.failed.each do |failure|
32
36
  failure.output.append(output)
33
37
  end
38
+
39
+ exit(1)
34
40
  end
data/bin/sus-parallel CHANGED
@@ -3,6 +3,10 @@
3
3
  require_relative '../lib/sus'
4
4
  require_relative '../lib/sus/progress'
5
5
 
6
+ if File.exist?("config/test.rb")
7
+ load("config/test.rb")
8
+ end
9
+
6
10
  require 'etc'
7
11
 
8
12
  def prepare(paths, registry)
@@ -85,4 +89,6 @@ if assertions.failed.any?
85
89
  assertions.failed.each do |failure|
86
90
  failure.output.append(output)
87
91
  end
92
+
93
+ exit(1)
88
94
  end
data/lib/sus/expect.rb CHANGED
@@ -34,7 +34,11 @@ module Sus
34
34
 
35
35
  class Base
36
36
  def expect(subject = nil, &block)
37
- Expect.new(@assertions, subject || block)
37
+ if block_given?
38
+ Expect.new(@assertions, block)
39
+ else
40
+ Expect.new(@assertions, subject)
41
+ end
38
42
  end
39
43
  end
40
44
  end
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.5.1"
4
+ VERSION = "0.6.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: