petitest-power_assert 0.1.1 → 0.2.0

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
  SHA1:
3
- metadata.gz: 16c663e79f2ef688e0e97763f605c88bad79cabc
4
- data.tar.gz: b2721a1c72f9475147aea3b2ba0f7c0fe6e8edfa
3
+ metadata.gz: 6a91749f09f6b31f8fe88dae50185888d36d7cdf
4
+ data.tar.gz: d32a032022756389e70adfb6880772547aca77cc
5
5
  SHA512:
6
- metadata.gz: c662342c25da921e29f9111e585680398eb4992cc4e5c816bc7f38c40b26a4d8f6223787a9ac831515e7dd6d30608350de457716581a3678efdfc71ddf134c39
7
- data.tar.gz: 5e8f612863c2166879cd51f9ba920df9a5ef04f5eb7a666eb8f44aaa45b4443b281aa937b7055a80ca6c8bf244aa806fb96445ba1f325e35b6785980b2af00f7
6
+ metadata.gz: e71d2c9c8451eeb084339ad77e65cdb4ee1ea4642e3c332210238f126ac4a88bae3f62868170bf970c8065e8402d9ec469f12163453f959a45c03fdbed432162
7
+ data.tar.gz: 8b48ad8a330c5b853da8e6b94d2e828dfc8c82b3c940e1dfdcfc3338ba199f58859da44e4636c13c1bbfc7cff13f4938e38a4b9810edba2a5feedc583d3e6a29
@@ -1,3 +1,8 @@
1
+ ## v0.2.0
2
+
3
+ - Support petitest 0.2.0
4
+ - Drop petitest 0.1.x support
5
+
1
6
  ## v0.1.1
2
7
 
3
8
  - 1st Release :tada:
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Petitest::PowerAssert
2
2
 
3
- [Power Assert](https://github.com/k-tsj/power_assert) for Petitest.
3
+ [![Gem Version](https://badge.fury.io/rb/petitest-power_assert.svg)](https://rubygems.org/gems/petitest-power_assert)
4
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/github/petitest/petitest-power_assert)
5
+
6
+ [Power Assert](https://github.com/k-tsj/power_assert) for [Petitest](https://github.com/petitest/petitest).
4
7
 
5
8
  ## Installation
6
9
 
@@ -24,9 +27,9 @@ gem install petitest-power_assert
24
27
 
25
28
  ## Usage
26
29
 
27
- 1. Require `petitest/power_assert`
28
- 1. Prepend `Petitest::PowerAssert` into your test group
29
- 1. Write tests as usual
30
+ 1. Require `"petitest/power_assert"`
31
+ 1. Prepend `Petitest::PowerAssert` into your test groups
32
+ 1. Write your test cases as usual
30
33
 
31
34
  ```ruby
32
35
  require "petitest/autorun"
@@ -35,19 +38,13 @@ require "petitest/power_assert"
35
38
  class ExampleTest < Petitest::TestGroup
36
39
  prepend ::Petitest::PowerAssert
37
40
 
38
- def test_block
41
+ def test_addition
39
42
  a = 1
40
43
  b = 1
41
44
  assert do
42
45
  a + b == 100
43
46
  end
44
47
  end
45
-
46
- def test_equality
47
- assert_equal("foo" + "bar", :baz.to_s)
48
- end
49
-
50
- # ... tests, tests, and more tests ...
51
48
  end
52
49
  ```
53
50
 
@@ -6,12 +6,11 @@ module Petitest
6
6
  private
7
7
 
8
8
  # @note Override
9
- def check(**args, &block)
9
+ def check(message, &block)
10
10
  ::PowerAssert.start(block, assertion_method: __callee__) do |power_assert|
11
11
  result = power_assert.yield
12
- message = power_assert.message
13
- message = nil if message.empty?
14
- super(**args, message: message) do
12
+ message = power_assert.message unless power_assert.message.empty?
13
+ super(message) do
15
14
  result
16
15
  end
17
16
  end
@@ -1,5 +1,5 @@
1
1
  module Petitest
2
2
  module PowerAssert
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -17,9 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ["lib"]
18
18
 
19
19
  spec.add_dependency "power_assert"
20
- spec.add_dependency "petitest", ">= 0.1.1"
20
+ spec.add_dependency "petitest", ">= 0.2.0"
21
21
  spec.add_development_dependency "bundler", "~> 1.14"
22
22
  spec.add_development_dependency "petitest"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rspec", "~> 3.0"
25
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petitest-power_assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: power_assert
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.1
33
+ version: 0.2.0
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: 0.1.1
40
+ version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '3.0'
97
83
  description:
98
84
  email:
99
85
  - r7kamura@gmail.com