r_spec 1.0.0.beta8 → 1.0.0.beta9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6599635e0de35bec4d9bae9f58ab1417a364eb2a0bd64db49b523be4d9ab1d16
|
4
|
+
data.tar.gz: 658671a666d8173ce075558dc7dc0f5604e2a98f86e0448485c2ad713ec518be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45babe5acbed804ce1a61476c39028cdaa46256c343b0b6001b83e0bd5cda35a83770bd06776c7b76d22cb0dd3cbc07be7978d30d99c04cc1585e9cdeb933778
|
7
|
+
data.tar.gz: 78f72312fc8c2ad764647a1e6698f4a094bfc3129c0b2911f809502ba9a11d9a0da88ffafc2420c68d55fdaeeb8062258e8ff738013bded1bcf1970f536f192d
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "expresenter"
|
4
|
+
require "test_tube"
|
4
5
|
|
5
6
|
require_relative File.join("..", "console")
|
6
7
|
|
@@ -50,12 +51,12 @@ module RSpec
|
|
50
51
|
|
51
52
|
protected
|
52
53
|
|
54
|
+
# @param passed [Boolean] The high expectation passed or failed.
|
53
55
|
# @param actual [#object_id] The actual value.
|
54
56
|
# @param error [Exception, nil] Any raised exception.
|
55
57
|
# @param got [Boolean, nil] Any returned value.
|
56
58
|
# @param matcher [#matches?] The matcher.
|
57
59
|
# @param negate [Boolean] The assertion is positive or negative.
|
58
|
-
# @param valid [Boolean] The result of an expectation.
|
59
60
|
#
|
60
61
|
# @return [nil] Write a message to STDOUT.
|
61
62
|
#
|
@@ -63,14 +64,13 @@ module RSpec
|
|
63
64
|
# `Kernel.exit(false)` with a failure message written to STDERR.
|
64
65
|
#
|
65
66
|
# @api private
|
66
|
-
def result(actual:, error:, got:, matcher:, negate
|
67
|
-
Console.passed_spec ::Expresenter.call(
|
67
|
+
def result(passed, actual:, error:, got:, matcher:, negate:)
|
68
|
+
Console.passed_spec ::Expresenter.call(passed).with(
|
68
69
|
actual: actual,
|
69
70
|
error: error,
|
70
71
|
expected: matcher.expected,
|
71
72
|
got: got,
|
72
73
|
negate: negate,
|
73
|
-
valid: valid,
|
74
74
|
matcher: matcher.class.to_sym,
|
75
75
|
level: :MUST
|
76
76
|
)
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "spectus/exam"
|
4
|
-
|
5
3
|
require_relative "base"
|
6
4
|
|
7
5
|
module RSpec
|
@@ -30,20 +28,20 @@ module RSpec
|
|
30
28
|
# @raise [SystemExit] Terminate execution immediately by calling
|
31
29
|
# `Kernel.exit(false)` with a failure message written to STDERR.
|
32
30
|
def absolute_requirement(matcher:, negate:)
|
33
|
-
|
34
|
-
|
31
|
+
experiment = ::TestTube.invoke(
|
32
|
+
@actual,
|
35
33
|
isolation: false,
|
36
|
-
|
37
|
-
|
34
|
+
matcher: matcher,
|
35
|
+
negate: negate
|
38
36
|
)
|
39
37
|
|
40
38
|
result(
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
experiment.got.equal?(true),
|
40
|
+
actual: experiment.actual,
|
41
|
+
error: experiment.error,
|
42
|
+
got: experiment.got,
|
44
43
|
matcher: matcher,
|
45
|
-
negate: negate
|
46
|
-
valid: exam.valid?
|
44
|
+
negate: negate
|
47
45
|
)
|
48
46
|
end
|
49
47
|
end
|
@@ -28,15 +28,19 @@ module RSpec
|
|
28
28
|
# @raise [SystemExit] Terminate execution immediately by calling
|
29
29
|
# `Kernel.exit(false)` with a failure message written to STDERR.
|
30
30
|
def absolute_requirement(matcher:, negate:)
|
31
|
-
|
31
|
+
experiment = ::TestTube.pass(
|
32
|
+
@actual,
|
33
|
+
matcher: matcher,
|
34
|
+
negate: negate
|
35
|
+
)
|
32
36
|
|
33
37
|
result(
|
34
|
-
|
35
|
-
|
36
|
-
|
38
|
+
experiment.got.equal?(true),
|
39
|
+
actual: experiment.actual,
|
40
|
+
error: experiment.error,
|
41
|
+
got: experiment.got,
|
37
42
|
matcher: matcher,
|
38
|
-
negate: negate
|
39
|
-
valid: valid
|
43
|
+
negate: negate
|
40
44
|
)
|
41
45
|
end
|
42
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expresenter
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: matchi-rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.1.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: test_tube
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|