soft-assert 1.0.1 → 1.0.3

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.

Potentially problematic release.


This version of soft-assert might be problematic. Click here for more details.

Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/soft_assert.rb +6 -1
  3. metadata +16 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb81441be8c11199af42c789dbb2650a1cfefddaa24a270fdcd9ce81102c620c
4
- data.tar.gz: 480fde6e0494d612d0a901bd02fbe69b42ee0db859d8a1485125d3953d3230f3
3
+ metadata.gz: 00f990ab1d78cc13eb608dd5e848a75902cdffe94061bf0c48766e7f47ad2b12
4
+ data.tar.gz: 3450a4f9f3f405ebee592f8feb34e71e593d53a26e356d57d5e4dcc0157e851e
5
5
  SHA512:
6
- metadata.gz: 0f43847e8520c7f49b46f51aae078211d73525b615032066c21dec5a273376e07cffb6b136077fb07872091e161fde928a055214b10e7b324a2aa1ef1807926a
7
- data.tar.gz: f6762dd17f3ebce40e997eecfec8a739140f8245cf7cd75eb7d05ecfe49fef6cde158c48ba111887b05e2ecc72b3bd7b76a55bba0b8ce7dd873f201031d2419c
6
+ metadata.gz: d63a53c78df8bf8c7ce9525bd92fddef447d1ca417591ad2761d82754b30385e5cab52423da9748dca19308f24136314e7a7861ddc4581d99370bf802df58a17
7
+ data.tar.gz: f0f21bdc85d0e9775f3e7fb01a4a58a6662d17dd0d010aac6cc77e315fe0634ab31a998d418da1ae6f1cba009c4714cd3a8c5057da01479fdbed2c3843f76241
data/lib/soft_assert.rb CHANGED
@@ -11,6 +11,9 @@ require 'test/unit/assertions'
11
11
  module SoftAssert
12
12
  extend Minitest::Assertions
13
13
 
14
+ class SoftAssertionError < Minitest::Assertion
15
+ end
16
+
14
17
  class << self
15
18
  attr_accessor :assertions
16
19
  end
@@ -193,6 +196,8 @@ module SoftAssert
193
196
 
194
197
  errors = @soft_errors
195
198
  @soft_errors = []
196
- raise "Soft Assertion\n#{errors.join("\n\n")}\n"
199
+
200
+ message = "Soft Assertion\n#{errors.join("\n\n")}\n"
201
+ raise SoftAssertionError, message
197
202
  end
198
203
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soft-assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashitha Rao
@@ -9,13 +9,16 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-18 00:00:00.000000000 Z
12
+ date: 2026-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '5.20'
21
+ - - ">"
19
22
  - !ruby/object:Gem::Version
20
23
  version: 5.20.0
21
24
  type: :runtime
@@ -23,6 +26,9 @@ dependencies:
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '5.20'
31
+ - - ">"
26
32
  - !ruby/object:Gem::Version
27
33
  version: 5.20.0
28
34
  - !ruby/object:Gem::Dependency
@@ -31,14 +37,20 @@ dependencies:
31
37
  requirements:
32
38
  - - "~>"
33
39
  - !ruby/object:Gem::Version
34
- version: 3.6.1
40
+ version: '3.6'
41
+ - - ">"
42
+ - !ruby/object:Gem::Version
43
+ version: 3.6.0
35
44
  type: :runtime
36
45
  prerelease: false
37
46
  version_requirements: !ruby/object:Gem::Requirement
38
47
  requirements:
39
48
  - - "~>"
40
49
  - !ruby/object:Gem::Version
41
- version: 3.6.1
50
+ version: '3.6'
51
+ - - ">"
52
+ - !ruby/object:Gem::Version
53
+ version: 3.6.0
42
54
  description: |-
43
55
  The Soft Assert gem enhances testing capabilities with flexible assertion methods.Unlike traditional assertions, Soft Assert does not interrupt test execution on failure. Instead, it logs errors and continues testing, allowing you to identify and review all failures simultaneously. This gem integrates smoothly with leading testing frameworks, including Minitest and Test::Unit, making comprehensive testing more efficient.
44
56
  To utilize Soft Assert effectively, simply use its assertion methods during testing. Then, conclude with SoftAssert.assert_all to review and fail the test if any failures were captured.