rspec-matchers-power_assert_matchers 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d564799c1a95c1c7ccd5702c5d788de447df3a29d4433880d7430263d75e7a10
|
4
|
+
data.tar.gz: e1c483922b43ad1eba63eff3e07166972000b2cfe4894952c59cb18ab94c4bc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63f00e88d7f87e554dd4373d6e31153c9488e1240af240106df4bdf695d20dac337bd8972a126d6db0224009b29cb6c622e7793be3933483d8068586f8a64a88
|
7
|
+
data.tar.gz: 33e1bdba40c829f1ef0d15d4ab107480b486389be6435d3894837117cc3f93609ba4957598deefbbef6bede26545df99abc19792794b459824e16c7d01fe24c0
|
data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Add below code into your `library`'s gemspec
|
|
24
24
|
|
25
25
|
```ruby
|
26
26
|
Gem::Specification.new do |gem|
|
27
|
-
gem.add_development_dependency 'rspec-matchers-power_assert_matchers', '0.0.
|
27
|
+
gem.add_development_dependency 'rspec-matchers-power_assert_matchers', '0.0.2'
|
28
28
|
end
|
29
29
|
```
|
30
30
|
|
@@ -32,7 +32,7 @@ Or add below into your `application`'s `Gemfile`
|
|
32
32
|
|
33
33
|
```ruby
|
34
34
|
group :test do
|
35
|
-
gem 'rspec-matchers-power_assert_matchers', '0.0.
|
35
|
+
gem 'rspec-matchers-power_assert_matchers', '0.0.2'
|
36
36
|
end
|
37
37
|
```
|
38
38
|
|
@@ -42,7 +42,7 @@ So adding this into your `spec_helper.rb` or `rails_helper.rb`
|
|
42
42
|
require 'rspec/matchers/power_assert_matchers'
|
43
43
|
```
|
44
44
|
|
45
|
-
|
45
|
+
Then you can use `power_assert` with a simple custom matcher in rspec.
|
46
46
|
|
47
47
|
Use `expect` with block, and use `be_assert` matcher.
|
48
48
|
|
@@ -81,10 +81,10 @@ If you want to easy to check the behavior, this repository has example specs.
|
|
81
81
|
```console
|
82
82
|
$ git clone git@github.com:kachick/rspec-matchers-power_assert_matchers.git
|
83
83
|
$ cd rspec-matchers-power_assert_matchers
|
84
|
-
$ cat ./examples/spec/example_spec.rb
|
85
|
-
Rough examples will be shown!
|
86
84
|
$ bundle install
|
87
85
|
$ bundle exec rake look_at_examples
|
86
|
+
Rough examples will be shown!
|
87
|
+
$ bundle exec rake run_examples
|
88
88
|
Some results will be shown!
|
89
89
|
```
|
90
90
|
|
@@ -36,18 +36,18 @@ RSpec::Matchers.define(:be_assert) do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
result
|
39
|
-
when String
|
40
|
-
raise NotImplementedError
|
41
39
|
else
|
40
|
+
dsl_context.failure_message do
|
41
|
+
# https://github.com/rspec/rspec-expectations/blob/43bf64b01f8356979ffbc373b2e81d2ab1389b29/lib/rspec/matchers/built_in/base_matcher.rb#L97-L99
|
42
|
+
# https://github.com/rspec/rspec-expectations/blob/43bf64b01f8356979ffbc373b2e81d2ab1389b29/lib/rspec/matchers/built_in/be.rb#L7-L18
|
43
|
+
"expected: truthy value\n got: #{RSpec::Support::ObjectFormatter.format(actual)}"
|
44
|
+
end
|
45
|
+
|
42
46
|
actual
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
46
50
|
supports_block_expectations
|
47
|
-
|
48
|
-
description do
|
49
|
-
'as a be_truthy with power_assert'
|
50
|
-
end
|
51
51
|
end
|
52
52
|
|
53
53
|
require_relative 'power_assert_matchers/version'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-matchers-power_assert_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenichi Kamiya
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -136,20 +136,20 @@ dependencies:
|
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 1.
|
139
|
+
version: 1.15.0
|
140
140
|
- - "<"
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: 1.
|
142
|
+
version: 1.16.0
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
145
|
version_requirements: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 1.
|
149
|
+
version: 1.15.0
|
150
150
|
- - "<"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.16.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rubocop-rake
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,7 +213,7 @@ executables: []
|
|
213
213
|
extensions: []
|
214
214
|
extra_rdoc_files: []
|
215
215
|
files:
|
216
|
-
- LICENSE
|
216
|
+
- LICENSE.txt
|
217
217
|
- README.md
|
218
218
|
- lib/rspec/matchers/power_assert_matchers.rb
|
219
219
|
- lib/rspec/matchers/power_assert_matchers/version.rb
|