minitest-keyword 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +1 -6
- data/.travis.yml +6 -3
- data/CHANGELOG.md +14 -0
- data/Gemfile +2 -0
- data/{LICENSE.txt → LICENSE} +1 -1
- data/README.md +3 -4
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/lib/minitest/keyword.rb +6 -0
- data/lib/minitest/keyword/version.rb +3 -1
- data/minitest-keyword.gemspec +6 -8
- metadata +14 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4aed7685063ddba46ffee74bf622edbd0f6a7146fedfe45cc13e59e4a6d986c4
|
4
|
+
data.tar.gz: 726bd9ed6d71b31f0620f673ef857a4ffbc1590c827ed52c849f0f78b9d49ee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a5bfb013c016b9ff7eb4c6bb54437a684dfeecfe421baac9db19ff6f0fb62c2c2234dcdca5d8c41c579fb5881022622c4bf27b48e859a6000a6262f844eaf5a
|
7
|
+
data.tar.gz: 437e24403249041deaae6cb2c631b74107e66b0ace75dbfd97647c7a168d40bf0a7de6ad8843015062878b91e7d19cf3d8e60fff6211121f97e6d012c1202c89
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [1.0.0] - 2019-01-06
|
10
|
+
### Changed
|
11
|
+
- The name of the underlying parameter changed for `assert_in_epsilon` from `a` and `b` to `exp` and `act`. As such in order to normalize, those were aliased to `expected` and `actual` as well.
|
12
|
+
|
13
|
+
[Unreleased]: https://github.com/CultureHQ/client/compare/v1.0.0...HEAD
|
14
|
+
[1.0.0]: https://github.com/CultureHQ/client/compare/v0.0.2...v1.0.0
|
data/Gemfile
CHANGED
data/{LICENSE.txt → LICENSE}
RENAMED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Minitest::Keyword
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/kddeisz/minitest-keyword.svg?branch=master)](https://travis-ci.org/kddeisz/minitest-keyword)
|
4
|
-
[![Coverage Status](https://coveralls.io/repos/github/kddeisz/minitest-keyword/badge.svg?branch=master)](https://coveralls.io/github/kddeisz/minitest-keyword?branch=master)
|
5
4
|
[![Gem](https://img.shields.io/gem/v/minitest-keyword.svg)](https://rubygems.org/gems/minitest-keyword)
|
6
5
|
|
7
6
|
A small gem for allowing you to use Minitest assertions with keyword arguments. No longer worry about remembering the order of arguments!
|
@@ -24,7 +23,7 @@ Or install it yourself as:
|
|
24
23
|
|
25
24
|
## Usage
|
26
25
|
|
27
|
-
Add `require 'minitest
|
26
|
+
Add `require 'minitest/keyword'` to your `test_helper.rb` script. In your tests you will now be able to change your assertions from:
|
28
27
|
|
29
28
|
```ruby
|
30
29
|
assert_equal 'foo', foo.inspect
|
@@ -47,7 +46,7 @@ assert test:, message: nil
|
|
47
46
|
assert_empty object:, message: nil
|
48
47
|
assert_equal expected:, actual:, message: nil
|
49
48
|
assert_in_delta expected:, actual:, delta:, message: nil
|
50
|
-
assert_in_epsilon
|
49
|
+
assert_in_epsilon expected:, actual:, epsilon:, message: nil
|
51
50
|
assert_includes collection:, object:, message: nil
|
52
51
|
assert_instance_of class:, object:, message: nil
|
53
52
|
assert_kind_of class:, object:, message: nil
|
@@ -69,7 +68,7 @@ refute test:, message: nil
|
|
69
68
|
refute_empty object:, message: nil
|
70
69
|
refute_equal expected:, actual:, message: nil
|
71
70
|
refute_in_delta expected:, actual:, delta:, message: nil
|
72
|
-
refute_in_epsilon
|
71
|
+
refute_in_epsilon expected:, actual:, epsilon:, message: nil
|
73
72
|
refute_includes collection:, object:, message: nil
|
74
73
|
refute_instance_of class:, object:, message: nil
|
75
74
|
refute_kind_of class:, object:, message: nil
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/minitest/keyword.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'minitest'
|
2
4
|
require 'minitest/keyword/version'
|
3
5
|
|
@@ -7,7 +9,9 @@ module Minitest
|
|
7
9
|
module Keyword
|
8
10
|
# Longer names so that the keywords make more sense
|
9
11
|
ALIASES = {
|
12
|
+
a: :expected,
|
10
13
|
act: :actual,
|
14
|
+
b: :actual,
|
11
15
|
cls: :class,
|
12
16
|
exp: :expected,
|
13
17
|
meth: :method,
|
@@ -38,6 +42,7 @@ module Minitest
|
|
38
42
|
parameters = Assertions.instance_method(method_name).parameters
|
39
43
|
next if parameters.empty?
|
40
44
|
|
45
|
+
# rubocop:disable Metrics/MethodLength
|
41
46
|
define_method(method_name) do |*args, **kwargs, &block|
|
42
47
|
passed_params = []
|
43
48
|
|
@@ -65,6 +70,7 @@ module Minitest
|
|
65
70
|
super(*passed_params, &block)
|
66
71
|
end
|
67
72
|
end
|
73
|
+
# rubocop:enable Metrics/MethodLength
|
68
74
|
end
|
69
75
|
|
70
76
|
# Hook into the Minitest::Test class and prepend the Keyword module
|
data/minitest-keyword.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'minitest/keyword/version'
|
6
6
|
|
@@ -21,12 +21,10 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.required_ruby_version = '>= 2.1.0'
|
25
24
|
spec.add_dependency 'minitest', '~> 5.0'
|
26
25
|
|
27
|
-
spec.add_development_dependency 'bundler', '~>
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
31
|
-
spec.add_development_dependency 'simplecov', '~> 0.14'
|
26
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.62'
|
29
|
+
spec.add_development_dependency 'simplecov', '~> 0.15'
|
32
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-keyword
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -30,70 +30,56 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
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: '
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: coveralls
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.8'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.8'
|
40
|
+
version: '2.0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rake
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: '12.
|
47
|
+
version: '12.3'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version: '12.
|
54
|
+
version: '12.3'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rubocop
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
61
|
+
version: '0.62'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
68
|
+
version: '0.62'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: simplecov
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
75
|
+
version: '0.15'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
82
|
+
version: '0.15'
|
97
83
|
description:
|
98
84
|
email:
|
99
85
|
- kevin.deisz@gmail.com
|
@@ -104,8 +90,9 @@ files:
|
|
104
90
|
- ".gitignore"
|
105
91
|
- ".rubocop.yml"
|
106
92
|
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
107
94
|
- Gemfile
|
108
|
-
- LICENSE
|
95
|
+
- LICENSE
|
109
96
|
- README.md
|
110
97
|
- Rakefile
|
111
98
|
- bin/console
|
@@ -125,15 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
112
|
requirements:
|
126
113
|
- - ">="
|
127
114
|
- !ruby/object:Gem::Version
|
128
|
-
version:
|
115
|
+
version: '0'
|
129
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
117
|
requirements:
|
131
118
|
- - ">="
|
132
119
|
- !ruby/object:Gem::Version
|
133
120
|
version: '0'
|
134
121
|
requirements: []
|
135
|
-
|
136
|
-
rubygems_version: 2.6.11
|
122
|
+
rubygems_version: 3.0.1
|
137
123
|
signing_key:
|
138
124
|
specification_version: 4
|
139
125
|
summary: Use Minitest assertions with keyword arguments
|