minitest_lucid 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +58 -2
- data/lib/minitest_lucid.rb +1 -1
- data/lib/minitest_lucid/version.rb +1 -1
- data/markdown/readme/lucid.rb +10 -0
- data/markdown/readme/not_lucid.rb +10 -0
- data/markdown/readme/struct/assert_equal/data.rb +1 -1
- data/markdown/readme/template.md +32 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db2f61b2bf814f8a4dfb3996c36657c18de46ba90864c84181901bd23deabe7a
|
4
|
+
data.tar.gz: e03ac5e893f564a8e80c94e843c97196f6f46c23c36899a46324f9a99ba169cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c4d981321f2d732ecda7c9094999eb1005d16ed596878a89d47ba0d3acf52980060ee62aa04b2b1553d706ddaca19552bddb59fdcfe7c510e7f23638b8471f7
|
7
|
+
data.tar.gz: 505a9e600064104fbf07cc112757f19e0fff4681e03405fac8eb0ca5cccd13125df7835f4792b3ab530dc057ff20dc732d181008304b7c00f8da09c1ac3e27b7
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,65 @@
|
|
1
1
|
# Minitest Lucid
|
2
2
|
|
3
|
-
Use ```minitest_lucid``` to improve
|
3
|
+
Use ```minitest_lucid``` to improve assertion messages from ```minitest```.
|
4
4
|
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
To use ```minitest_lucid```, install the gem and then in your tests,
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'minitest_lucid'
|
11
|
+
```
|
12
|
+
|
13
|
+
instead of
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'minitest/autorun'
|
17
|
+
```
|
18
|
+
|
19
|
+
No other code change is required.
|
20
|
+
|
21
|
+
For example, change this test
|
22
|
+
|
23
|
+
```not_lucid.rb```:
|
24
|
+
```ruby
|
25
|
+
require 'minitest/autorun'
|
26
|
+
|
27
|
+
class MyTest < Minitest::Test
|
28
|
+
|
29
|
+
def test_foo
|
30
|
+
expected = {:a => 0, :b => 1}
|
31
|
+
actual = {}
|
32
|
+
assert_equal(expected, actual)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
to this
|
38
|
+
|
39
|
+
```lucid.rb```:
|
40
|
+
```ruby
|
41
|
+
require 'minitest_lucid'
|
42
|
+
|
43
|
+
class MyTest < Minitest::Test
|
44
|
+
|
45
|
+
def test_foo
|
46
|
+
expected = {:a => 0, :b => 1}
|
47
|
+
actual = {}
|
48
|
+
assert_equal(expected, actual)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
See example outputs below.
|
5
54
|
|
6
55
|
## Supported Classes
|
7
56
|
|
57
|
+
For supported classes, method ```assert_equal``` gets elucidated handling.
|
58
|
+
|
59
|
+
For other classes and assertion methods, the original assertion behaviors are unchanged.
|
60
|
+
|
61
|
+
The supported classes:
|
62
|
+
|
8
63
|
- [Hash](#hash)
|
9
64
|
- [Set](#set)
|
10
65
|
- [Struct](#struct)
|
@@ -422,7 +477,8 @@ def actual
|
|
422
477
|
'Noabor modo autaa aata.',
|
423
478
|
'Ad irab ut cupar.',
|
424
479
|
)
|
425
|
-
end
|
480
|
+
end
|
481
|
+
```
|
426
482
|
|
427
483
|
The default ```Minitest::Assertion``` message:
|
428
484
|
|
data/lib/minitest_lucid.rb
CHANGED
data/markdown/readme/template.md
CHANGED
@@ -1,10 +1,41 @@
|
|
1
1
|
# Minitest Lucid
|
2
2
|
|
3
|
-
Use ```minitest_lucid``` to improve
|
3
|
+
Use ```minitest_lucid``` to improve assertion messages from ```minitest```.
|
4
4
|
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
To use ```minitest_lucid```, install the gem and then in your tests,
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'minitest_lucid'
|
11
|
+
```
|
12
|
+
|
13
|
+
instead of
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'minitest/autorun'
|
17
|
+
```
|
18
|
+
|
19
|
+
No other code change is required.
|
20
|
+
|
21
|
+
For example, change this test
|
22
|
+
|
23
|
+
@[ruby](not_lucid.rb)
|
24
|
+
|
25
|
+
to this
|
26
|
+
|
27
|
+
@[ruby](lucid.rb)
|
28
|
+
|
29
|
+
See example outputs below.
|
5
30
|
|
6
31
|
## Supported Classes
|
7
32
|
|
33
|
+
For supported classes, method ```assert_equal``` gets elucidated handling.
|
34
|
+
|
35
|
+
For other classes and assertion methods, the original assertion behaviors are unchanged.
|
36
|
+
|
37
|
+
The supported classes:
|
38
|
+
|
8
39
|
- [Hash](#hash)
|
9
40
|
- [Set](#set)
|
10
41
|
- [Struct](#struct)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest_lucid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- burdettelamar
|
@@ -126,6 +126,8 @@ files:
|
|
126
126
|
- markdown/readme/hash/assert_equal/lucid.txt
|
127
127
|
- markdown/readme/hash/assert_equal/template.md
|
128
128
|
- markdown/readme/hash/template.md
|
129
|
+
- markdown/readme/lucid.rb
|
130
|
+
- markdown/readme/not_lucid.rb
|
129
131
|
- markdown/readme/set/assert_equal/better.txt
|
130
132
|
- markdown/readme/set/assert_equal/data.rb
|
131
133
|
- markdown/readme/set/assert_equal/default.txt
|