minitest-power_assert 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -5
- data/README.md +5 -6
- data/Rakefile +2 -0
- data/lib/minitest/power_assert/version.rb +1 -1
- data/minitest-power_assert.gemspec +1 -1
- data/test/test_power_assert.rb +2 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cb719ef5d9d91b9db2c7c3f7785bac68c60059a
|
4
|
+
data.tar.gz: 93b670a1a37b11c3ad4bc1f4dcfc1379508e10b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b83f82b8d0e1fc41d4eeac832d18ec6f118c4252b43a86e73f15ca35da94c6bf854a4b89f8174184ac53fb519e77fd475417f1c78b88f2eec21a959873d776e
|
7
|
+
data.tar.gz: a0ad59400c43ae7610da2f8bb830ae9a248011b04a55f36dad6a6d6650c32ee9b202d15c2459b29ca433e17625607d3d4417a72de54f154ed15c9b729869b79c
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# Minitest::PowerAssert
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/minitest-power_assert.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/minitest-power_assert.svg)](https://rubygems.org/gems/minitest-power_assert)
|
4
|
+
[![Build Status](https://travis-ci.org/hsbt/minitest-power_assert.svg)](https://travis-ci.org/hsbt/minitest-power_assert)
|
4
5
|
|
5
|
-
Power Assert for Minitest.
|
6
|
-
|
7
|
-
Basic concept is [test-unit-power_assert](https://github.com/k-tsj/test-unit-power_assert).
|
6
|
+
A Power Assert implementation for Minitest. This gem is inspired by the [test-unit-power_assert](https://github.com/k-tsj/test-unit-power_assert) gem.
|
8
7
|
|
9
8
|
## Installation
|
10
9
|
|
@@ -26,7 +25,7 @@ see [testcase](https://github.com/hsbt/minitest-power_assert/blob/master/test/te
|
|
26
25
|
|
27
26
|
### Basic Testcase
|
28
27
|
|
29
|
-
minitest-power_assert overrides assert method.
|
28
|
+
The `minitest-power_assert` gem overrides the `#assert` method. In order to use power assert, call the assert method with a block:
|
30
29
|
|
31
30
|
```ruby
|
32
31
|
class TestPowerAssert < Minitest::Test
|
@@ -36,7 +35,7 @@ class TestPowerAssert < Minitest::Test
|
|
36
35
|
end
|
37
36
|
```
|
38
37
|
|
39
|
-
If test
|
38
|
+
If the test above fails, it displays a test result with detailed information about variables:
|
40
39
|
|
41
40
|
```shell
|
42
41
|
1) Failure:
|
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "minitest"
|
22
|
-
spec.add_dependency "power_assert"
|
22
|
+
spec.add_dependency "power_assert", ">= 1.1"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
25
25
|
spec.add_development_dependency "rake"
|
data/test/test_power_assert.rb
CHANGED
@@ -23,7 +23,7 @@ class TestPowerAssert < Minitest::Test
|
|
23
23
|
def test_assert_failed
|
24
24
|
assert "0".class == "3".to_i.times.map {|i| i + 1 }.class
|
25
25
|
rescue Minitest::Assertion => e
|
26
|
-
assert_match(/
|
26
|
+
assert_match(/Expected false to be truthy./, e.message)
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_power_refute
|
@@ -43,6 +43,6 @@ class TestPowerAssert < Minitest::Test
|
|
43
43
|
def test_refute_failed
|
44
44
|
refute "0".class == String
|
45
45
|
rescue Minitest::Assertion => e
|
46
|
-
assert_match(/
|
46
|
+
assert_match(/Expected true to not be truthy./, e.message)
|
47
47
|
end
|
48
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-power_assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SHIBATA Hiroshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,10 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.6.12
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Power Assert for Minitest.
|
112
112
|
test_files:
|
113
113
|
- test/test_power_assert.rb
|
114
|
-
has_rdoc:
|