rspec-parameterized-context 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/run_rspec.yml +26 -0
- data/Appraisals +7 -0
- data/Gemfile +2 -1
- data/README.md +5 -5
- data/gemfiles/2.5.gemfile +9 -0
- data/gemfiles/2.6.gemfile +9 -0
- data/gemfiles/2.7.gemfile +9 -0
- data/lib/rspec_parameterized_context.rb +8 -2
- data/lib/rspec_parameterized_context/version.rb +1 -1
- metadata +10 -6
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3c603d4e42f9ed89ed4ae2cd15ff275b90946e1f6baa535e71323677913960e
|
4
|
+
data.tar.gz: 7ec7d5613024ffa5956d305c1f79b98f42045d5612af6913182b5b244373fa56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5913536b2e81bff61dedea80c848002c1e978e8cb33f7106856e3db8c395e198e555ba12c0c5a5b43d432296bac9cb4707199a08bb40d6d8f18a559f815d5762
|
7
|
+
data.tar.gz: 73cea398ebc85de08b2a4c3ec7fdf6c543f218ee3583a7bd3c0c52dd0f4a09a31227e2dfc6ed5e3cfe6dfbc75cd713fee33038fac1e29f84be3e14c736583193
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: run_rspec
|
2
|
+
|
3
|
+
on: pull_request
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
ruby: [2.5, 2.6, 2.7]
|
12
|
+
|
13
|
+
name: Run rspec on ruby ${{ matrix.ruby }}
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Install dependencies
|
22
|
+
run: |
|
23
|
+
bundle install
|
24
|
+
bundle exec appraisal bundle install
|
25
|
+
- name: Run rspec
|
26
|
+
run: bundle exec appraisal rspec
|
data/Appraisals
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Generate interfaces like `RSpec::Parameterized` to support parameterized testing that is evaluated in transaction.
|
4
4
|
|
5
|
+
Support Ruby 2.5 and later.
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -10,11 +12,9 @@ Add this line to your application's Gemfile:
|
|
10
12
|
gem 'rspec-parameterized-context'
|
11
13
|
```
|
12
14
|
|
13
|
-
Then add this
|
15
|
+
Then add this lines to files under `spec/support/`
|
14
16
|
|
15
17
|
```ruby
|
16
|
-
require 'rspec_parameterized_context'
|
17
|
-
|
18
18
|
RSpec.configure do |config|
|
19
19
|
config.extend RSpecParameterizedContext
|
20
20
|
end
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
###
|
25
|
+
### Syntax
|
26
26
|
|
27
27
|
Provide interfaces like `RSpec::Parameterized`.
|
28
28
|
|
@@ -48,7 +48,7 @@ describe "Addition" do
|
|
48
48
|
end
|
49
49
|
```
|
50
50
|
|
51
|
-
###
|
51
|
+
### Feature
|
52
52
|
|
53
53
|
rspec-parameterized-context supports to evaluate block that given where method in transaction.
|
54
54
|
|
@@ -51,10 +51,16 @@ module RSpecParameterizedContext
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def method_missing(action, *args,
|
55
|
-
@rspec_context.
|
54
|
+
def method_missing(action, *args, &block)
|
55
|
+
if @rspec_context.respond_to?(action)
|
56
|
+
@rspec_context.public_send(action, *args, &block)
|
57
|
+
else
|
58
|
+
super
|
59
|
+
end
|
56
60
|
end
|
57
61
|
|
62
|
+
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
63
|
+
|
58
64
|
def respond_to_missing?(action, include_private)
|
59
65
|
@rspec_context.respond_to?(action, include_private) || super
|
60
66
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-parameterized-context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alpaca-tc
|
8
8
|
- kamillle
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-09-
|
12
|
+
date: 2020-09-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email:
|
@@ -19,14 +19,18 @@ executables: []
|
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
|
+
- ".github/workflows/run_rspec.yml"
|
22
23
|
- ".gitignore"
|
23
24
|
- ".rspec"
|
24
|
-
-
|
25
|
+
- Appraisals
|
25
26
|
- CODE_OF_CONDUCT.md
|
26
27
|
- Gemfile
|
27
28
|
- LICENSE.txt
|
28
29
|
- README.md
|
29
30
|
- Rakefile
|
31
|
+
- gemfiles/2.5.gemfile
|
32
|
+
- gemfiles/2.6.gemfile
|
33
|
+
- gemfiles/2.7.gemfile
|
30
34
|
- lib/rspec-parameterized-context.rb
|
31
35
|
- lib/rspec_parameterized_context.rb
|
32
36
|
- lib/rspec_parameterized_context/version.rb
|
@@ -36,7 +40,7 @@ licenses:
|
|
36
40
|
- MIT
|
37
41
|
metadata:
|
38
42
|
homepage_uri: https://github.com/alpaca-tc/rspec-parameterized-context
|
39
|
-
post_install_message:
|
43
|
+
post_install_message:
|
40
44
|
rdoc_options: []
|
41
45
|
require_paths:
|
42
46
|
- lib
|
@@ -52,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
56
|
version: '0'
|
53
57
|
requirements: []
|
54
58
|
rubygems_version: 3.1.2
|
55
|
-
signing_key:
|
59
|
+
signing_key:
|
56
60
|
specification_version: 4
|
57
61
|
summary: ''
|
58
62
|
test_files: []
|