yardspec 0.1.0 → 0.2.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 +6 -13
- data/lib/yardspec/version.rb +1 -1
- data/lib/yardspec.rb +1 -1
- metadata +2 -3
- data/sig/yardspec.rbs +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1da0852647c52f92159ecb0e82a6ee8154c0bbdb35ef05d5b99f081ad9da52c3
|
4
|
+
data.tar.gz: ae22d1e6511ee81a9e139bf1a91cc9d71c22f9ed065a3f28fbb42e03635cf819
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b42b909a6c8a09d17ee377ef0582cff9fcd7d00d833fadde3c0c8a98def9393e6737e206957a7f2a59bb0fadf17261133ff8c44c41b1e4f6cb1c96ae6ce33e41
|
7
|
+
data.tar.gz: 9b9d2880021ceba8d1976ef85f067e2a2000df5c240cdf1d5f20db9c68811a71775f040fd1ebd6c7ac7b54a2733b0497c763aa6d06b8c643d821f7ca160f3830
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,19 +2,15 @@
|
|
2
2
|
|
3
3
|
[![test](https://github.com/r7kamura/yardspec/actions/workflows/test.yml/badge.svg)](https://github.com/r7kamura/yardspec/actions/workflows/test.yml)
|
4
4
|
|
5
|
-
|
5
|
+
Run YARD as RSpec.
|
6
6
|
|
7
7
|
```ruby
|
8
|
-
# frozen_string_literal: true
|
9
|
-
|
10
8
|
module Foo
|
11
|
-
# @example Returns "baz".
|
12
|
-
# expect(Foo::Bar.new.baz).to eq('baz')
|
13
9
|
class Bar
|
14
|
-
# @example
|
10
|
+
# @example returns "baz"
|
15
11
|
# expect(Foo::Bar.new.baz).to eq('baz')
|
16
12
|
#
|
17
|
-
# @example
|
13
|
+
# @example returns "bazbaz" for count 2
|
18
14
|
# expect(Foo::Bar.new.baz(count: 2)).to eq('bazbaz')
|
19
15
|
#
|
20
16
|
# @return [String]
|
@@ -30,15 +26,12 @@ The code above is interpreted as follows:
|
|
30
26
|
```
|
31
27
|
$ bundle exec rspec
|
32
28
|
|
33
|
-
Foo::Bar
|
34
|
-
Returns "baz".
|
35
|
-
|
36
29
|
Foo::Bar#baz
|
37
|
-
|
38
|
-
|
30
|
+
returns "baz"
|
31
|
+
returns "bazbaz" for count 2
|
39
32
|
|
40
33
|
Finished in 0.00129 seconds (files took 0.087 seconds to load)
|
41
|
-
|
34
|
+
2 examples, 0 failures
|
42
35
|
```
|
43
36
|
|
44
37
|
## Installation
|
data/lib/yardspec/version.rb
CHANGED
data/lib/yardspec.rb
CHANGED
@@ -18,7 +18,7 @@ module Yardspec
|
|
18
18
|
|
19
19
|
def define_rspec_examples
|
20
20
|
code_objects.each do |code_object|
|
21
|
-
::RSpec.describe(code_object.path) do
|
21
|
+
::RSpec.describe(code_object.path, type: :yardspec) do
|
22
22
|
code_object.tags('example').each do |tag|
|
23
23
|
it(tag.name) do
|
24
24
|
instance_eval(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yardspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -56,7 +56,6 @@ files:
|
|
56
56
|
- Rakefile
|
57
57
|
- lib/yardspec.rb
|
58
58
|
- lib/yardspec/version.rb
|
59
|
-
- sig/yardspec.rbs
|
60
59
|
- yardspec.gemspec
|
61
60
|
homepage: https://github.com/r7kamura/yardspec
|
62
61
|
licenses:
|
data/sig/yardspec.rbs
DELETED