easytest 0.10.1 → 0.12.0
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/CHANGELOG.md +9 -0
- data/lib/easytest/case.rb +1 -1
- data/lib/easytest/dsl.rb +2 -2
- data/lib/easytest/hook.rb +1 -1
- data/lib/easytest/utils.rb +11 -0
- data/lib/easytest/version.rb +1 -1
- data/sig/easytest.rbs +2 -2
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a540d5ea75dc9b2061c200bd9bdce35d807dd8bdc6430b78de5690468832942
|
|
4
|
+
data.tar.gz: 9165f6c8d0852a4fe6c3d12be43a86587331bcb6dc17dc230c023831c405a0d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fadc88c8be0d6ea331597a32ff3110df8adfb72ef48ea7eb27c7d50585cb1f399a4dedfcdd7cad838020d1e877ed96defbf263a506aaf9212868f4b226deb4c
|
|
7
|
+
data.tar.gz: 2f2ae0a7f25c0584d8f467e224117f0276e961075825ad151364555ce9ec8b15150b5c428021063c266217955823547e63e672b1acf2917d23ba90bd8963e289
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.12.0
|
|
6
|
+
|
|
7
|
+
- Drop Ruby 3.1 support due to EOL (March 2025).
|
|
8
|
+
- Fix Ruby 4.0 compatibility for `caller_locations`.
|
|
9
|
+
|
|
10
|
+
## 0.11.0
|
|
11
|
+
|
|
12
|
+
- Drop Ruby 3.0 support due to EOL (April 2024).
|
|
13
|
+
|
|
5
14
|
## 0.10.1
|
|
6
15
|
|
|
7
16
|
- No actual changes. Just switch to a new simplified release workflow.
|
data/lib/easytest/case.rb
CHANGED
data/lib/easytest/dsl.rb
CHANGED
data/lib/easytest/hook.rb
CHANGED
data/lib/easytest/utils.rb
CHANGED
|
@@ -24,5 +24,16 @@ module Easytest
|
|
|
24
24
|
def indent_text(text, indent_string)
|
|
25
25
|
text.gsub(/^(.+)/, "#{indent_string}\\1")
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
def find_caller_file
|
|
29
|
+
# Ruby 4.0 has a shorter call stack than 3.4, so we search for the first
|
|
30
|
+
# caller location that's outside the easytest library itself
|
|
31
|
+
lib_dir = File.expand_path("..", __dir__.to_s)
|
|
32
|
+
caller_locations&.each do |loc|
|
|
33
|
+
loc_path = loc.absolute_path
|
|
34
|
+
return loc_path if loc_path && !loc_path.start_with?(lib_dir)
|
|
35
|
+
end
|
|
36
|
+
raise "Failed to find caller file in: #{caller_locations&.first || '<no callers>'}"
|
|
37
|
+
end
|
|
27
38
|
end
|
|
28
39
|
end
|
data/lib/easytest/version.rb
CHANGED
data/sig/easytest.rbs
CHANGED
|
@@ -22,7 +22,7 @@ module Easytest
|
|
|
22
22
|
|
|
23
23
|
# Expect the given object or block to satisfy some criterion.
|
|
24
24
|
def expect: (untyped actual) -> Easytest::Expectation
|
|
25
|
-
| { () -> void } -> Easytest::Expectation
|
|
25
|
+
| () { () -> void } -> Easytest::Expectation
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# An expectation in test cases.
|
|
@@ -71,7 +71,7 @@ module Easytest
|
|
|
71
71
|
def to_have_attributes: (**untyped expected) -> void
|
|
72
72
|
|
|
73
73
|
# Expect to satisfy a condition that the given block returns `true`.
|
|
74
|
-
def to_satisfy: () { (untyped actual) ->
|
|
74
|
+
def to_satisfy: () { (untyped actual) -> boolish } -> void
|
|
75
75
|
|
|
76
76
|
# Expect to raise the given exception or an exception with the given message.
|
|
77
77
|
def to_raise: (Class expected, ?(String | Regexp)? with_message) -> void
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easytest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masafumi Koba
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: listen
|
|
@@ -87,7 +86,6 @@ metadata:
|
|
|
87
86
|
source_code_uri: https://github.com/ybiquitous/easytest
|
|
88
87
|
changelog_uri: https://github.com/ybiquitous/easytest/blob/main/CHANGELOG.md
|
|
89
88
|
rubygems_mfa_required: 'true'
|
|
90
|
-
post_install_message:
|
|
91
89
|
rdoc_options: []
|
|
92
90
|
require_paths:
|
|
93
91
|
- lib
|
|
@@ -95,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
95
93
|
requirements:
|
|
96
94
|
- - ">="
|
|
97
95
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '3.
|
|
96
|
+
version: '3.2'
|
|
99
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
98
|
requirements:
|
|
101
99
|
- - ">="
|
|
102
100
|
- !ruby/object:Gem::Version
|
|
103
101
|
version: '0'
|
|
104
102
|
requirements: []
|
|
105
|
-
rubygems_version:
|
|
106
|
-
signing_key:
|
|
103
|
+
rubygems_version: 4.0.16
|
|
107
104
|
specification_version: 4
|
|
108
105
|
summary: Easy testing for Ruby.
|
|
109
106
|
test_files: []
|