easytest 0.5.0 → 0.5.1

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: b72dfc70d7a8d0661cc8db8f80722598819cd167ff8eaeceeb15804088df94f0
4
- data.tar.gz: 9e3fa802e2efb674630998420f726c32a24021b9eb5bac8df77696ed9e3aeb23
3
+ metadata.gz: 8fe89003a399189c3dd7be356b251a1b1e153e235aa2bc4419553cec6c7f84e2
4
+ data.tar.gz: 4ad8a1cf831976b0d79bb433500737826f74baef0204b6ee203c23dce5b6d17c
5
5
  SHA512:
6
- metadata.gz: 956aa6d38ccbbca19cde275ecd821453c8858ff7ce2652528233a480563304ec71c0c1ace5337904a0895287a26aa088e0bd5a5622d602a43e89bd82e402078c
7
- data.tar.gz: ab7b14d3296cf0b37c517ff61f57b5b46b5697c9fd01af278f2fb1ca44ebe11b6f085a14565f8094ea41660a5eebfc7ef123b5d1b542ddfd6281ceef2a4a48e5
6
+ metadata.gz: 4e2f0f400c9db1e4bd7b67dc8fbe48deb432d08ecf43c1698c7468f96120845d77d40a2a7d5c157a52d92ae5053d6492a9b25e3c96fd602cdf13294c0924f799
7
+ data.tar.gz: cdc76fce7cee5a8f12a1c8781c8aa3791a1f0d9e36aa6853187e7f32a9d49b50620bf8a7caa7a24c2033bcb83744f80108d9926dece7366466901f497bd4dac3
data/CHANGELOG.md CHANGED
@@ -2,9 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.5.1
6
+
7
+ - Add RDoc to RBS.
8
+ - Publish the official website.
9
+
5
10
  ## 0.5.0
6
11
 
7
- - [Breaking] Rename `to_not_raise` to `to_raise_nothing`.
12
+ - **[Breaking]** Rename `to_not_raise` to `to_raise_nothing`.
8
13
  - Add `to_match` matcher.
9
14
  - Add `only` to run only any cases.
10
15
 
data/README.md CHANGED
@@ -9,18 +9,22 @@ Easytest is a tiny testing framework for Ruby with a familiar DSL.
9
9
 
10
10
  ## Installation
11
11
 
12
- via Bundler:
12
+ Add this line to your `Gemfile` for Bundler:
13
13
 
14
- ```shell
15
- bundle add easytest
14
+ ```ruby
15
+ gem "easytest"
16
16
  ```
17
17
 
18
- via gem:
18
+ Or install it via `gem`:
19
19
 
20
20
  ```shell
21
21
  gem install easytest
22
22
  ```
23
23
 
24
+ ## Documentation
25
+
26
+ You can read more about Easytest on the [official website](https://ybiquitous.github.io/easytest/).
27
+
24
28
  ## Usage
25
29
 
26
30
  Here is a very easy example.
@@ -78,8 +82,8 @@ The test now passes! 🎉
78
82
  If you want to skip any cases, you can change `test` to `skip`:
79
83
 
80
84
  ```diff
81
- -test "addition" do
82
- +skip "addition" do
85
+ - test "addition" do
86
+ + skip "addition" do
83
87
  ```
84
88
 
85
89
  Skipped cases will be reported as "skipped".
@@ -89,8 +93,8 @@ Skipped cases will be reported as "skipped".
89
93
  If you want to run only any cases, you can use `test` to `only`:
90
94
 
91
95
  ```diff
92
- -test "addition" do
93
- +only "addition" do
96
+ - test "addition" do
97
+ + only "addition" do
94
98
  ```
95
99
 
96
100
  Only cases with `only` will be run, and other cases will be skipped.
@@ -1,3 +1,3 @@
1
1
  module Easytest
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
data/sig/easytest.rbs CHANGED
@@ -1,29 +1,52 @@
1
+ # A easy testing framework.
1
2
  module Easytest
3
+ # The Easytest version.
2
4
  VERSION: String
3
5
 
6
+ # Define methods for the Easytest DSL.
4
7
  module DSL
5
8
  end
6
9
 
10
+ # Define methods for the Easytest DSL.
7
11
  class Expectation
12
+ # Negate an expectation.
8
13
  def not: () -> instance
9
14
 
15
+ # Expect to equal the given object.
10
16
  def to_eq: (untyped expected) -> void
11
17
  alias to_equal to_eq
12
18
 
19
+ # Expect to be the same as the given object.
13
20
  def to_be: (untyped expected) -> untyped
21
+
22
+ # Expect to be `nil`. Same as `to_be(nil)`.
14
23
  def to_be_nil: () -> void
24
+
25
+ # Expect to be `false`. Same as `to_be(false)`.
15
26
  def to_be_false: () -> void
27
+
28
+ # Expect to be `true`. Same as `to_be(true)`.
16
29
  def to_be_true: () -> void
17
30
 
18
- def to_be_a: (Class expected) -> void
19
- def to_be_kind_of: (Class expected) -> void
20
- def to_be_instance_of: (Class expected) -> void
31
+ # Expect to be an instance of the given class (module) or its subclasses.
32
+ def to_be_a: (Module expected) -> void
21
33
 
34
+ # Expect to be an instance of the given class (module) or its subclasses.
35
+ def to_be_kind_of: (Module expected) -> void
36
+
37
+ # Expect to be an instance of the given class (module).
38
+ def to_be_instance_of: (Module expected) -> void
39
+
40
+ # Expect to include the given object.
22
41
  def to_include: (untyped expected) -> void
23
42
 
43
+ # Expect to match the given object.
24
44
  def to_match: (untyped expected) -> void
25
45
 
46
+ # Expect to raise the given exception or an exception with the given message.
26
47
  def to_raise: ((Class | String | Regexp) expected) -> void
48
+
49
+ # Expect to raise nothing.
27
50
  def to_raise_nothing: () -> void
28
51
  end
29
52
  end
@@ -32,10 +55,13 @@ module Kernel
32
55
  # TODO: Can we avoid `RBS::DuplicatedMethodDefinitionError` "::Kernel#test has duplicated definitions"?
33
56
  # def test: (String name) ?{ () -> void } -> void
34
57
 
58
+ # Skip the given test case.
35
59
  def skip: (String name) { () -> void } -> void
36
60
 
61
+ # Run only the given test case.
37
62
  def only: (String name) { () -> void } -> void
38
63
 
64
+ # Expect the given object or block to satisfy some criterion.
39
65
  def expect: (untyped actual) -> Easytest::Expectation
40
66
  | { () -> void } -> Easytest::Expectation
41
67
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easytest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Koba
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-10-07 00:00:00.000000000 Z
@@ -68,7 +68,7 @@ metadata:
68
68
  source_code_uri: https://github.com/ybiquitous/easytest
69
69
  changelog_uri: https://github.com/ybiquitous/easytest/blob/main/CHANGELOG.md
70
70
  rubygems_mfa_required: 'true'
71
- post_install_message:
71
+ post_install_message:
72
72
  rdoc_options: []
73
73
  require_paths:
74
74
  - lib
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubygems_version: 3.3.7
87
- signing_key:
87
+ signing_key:
88
88
  specification_version: 4
89
89
  summary: Easy testing for Ruby.
90
90
  test_files: []