rspec-with_params 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d617765fb2fa8b4be3d9977a1d3417018670b8b44841c2a6acff950a934609b
4
- data.tar.gz: 312c62fe4fe871bb5d9aea5c5684b2172fe4d68d02e23f191158fd92b237dc37
3
+ metadata.gz: 7efe33799e8609c3ee3cac2ef1c18ab3edacb9a4f9ad10b5a4ae480c6e556eea
4
+ data.tar.gz: 102f61c2101ddb65c755858c0f71b008f114c1a625dc0c701555efb5683e9bed
5
5
  SHA512:
6
- metadata.gz: 12e9bec6e9c6423a8d8f4ff103f7d51d745803f324b5eebd461effd99afe985334d52bd3a0132c2fa472f8837dd3462f5ecd3695996fbd31b92686f9987ec564
7
- data.tar.gz: b2760a7e86dac1182a3fa61303c010e6ed740e8d76704998c09c619926fcd6ebdca21857e229179bf6eb47375169f4f2207e1c9b40e1c9f5c35be551acf72930
6
+ metadata.gz: a72958b7385424937fb148472cfc591268edd74f6e7324d74bd454e86e58d478c587cc1e6d80f94a09d1f063a9ccb8a2465f5f1c5c57b6e0f521383a902ff9ed
7
+ data.tar.gz: 42bfffdb836abb500fed9c79d45597483c716749a2a77c70d103c7fbaa722f1b10b2aa58e355ed8183e9f959baed0d951479e8e5491e321be43e76b333603528
@@ -0,0 +1,63 @@
1
+ ---
2
+ version: 2
3
+
4
+ #-------------------------------------------------------------------------------
5
+
6
+ base_job: &base_job
7
+ working_directory: ~/repo
8
+ steps:
9
+ - checkout
10
+
11
+ - restore_cache:
12
+ keys:
13
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
14
+ # fallback to using the latest cache if no exact match is found
15
+ - v1-dependencies-
16
+
17
+ - run:
18
+ name: install dependencies
19
+ command: bundle install --jobs=4 --retry=3 --path vendor/bundle
20
+
21
+ - save_cache:
22
+ paths:
23
+ - ./vendor/bundle
24
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
25
+
26
+ - run:
27
+ name: run tests
28
+ command: |
29
+ bundle exec rspec --format progress \
30
+ --format RspecJunitFormatter \
31
+ --out test-results/rspec.xml
32
+
33
+ # collect reports
34
+ - store_test_results:
35
+ path: test-results
36
+
37
+ #-------------------------------------------------------------------------------
38
+
39
+ jobs:
40
+ ruby-2.4:
41
+ <<: *base_job
42
+ docker:
43
+ - image: circleci/ruby:2.4
44
+ ruby-2.5:
45
+ <<: *base_job
46
+ docker:
47
+ - image: circleci/ruby:2.5
48
+ ruby-2.6:
49
+ <<: *base_job
50
+ docker:
51
+ - image: circleci/ruby:2.6
52
+ environment:
53
+ ENABLE_COVERAGE: 1
54
+
55
+ #-------------------------------------------------------------------------------
56
+
57
+ workflows:
58
+ version: 2
59
+ multiple-rubies:
60
+ jobs:
61
+ - ruby-2.4
62
+ - ruby-2.5
63
+ - ruby-2.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## V0.2.0
4
+
5
+ - Specify RSpec version `3.x`
6
+ - Specify Ruby version `>= 2.4`, `< 3`
7
+ - Frozen string literals
8
+
9
+ ## V0.1.0
10
+
11
+ - Initial release 🎉
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-with_params (0.1.0)
4
+ rspec-with_params (0.2.0)
5
+ rspec (~> 3.0)
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
- # Rspec::WithParams
1
+ # RSpec::WithParams
2
2
 
3
- Simple parameterized testing with RSpec (a.k.a) table tests. Zero runtime
4
- dependencies (well, you bring RSpec to the party).
3
+ [![Gem Version](https://badge.fury.io/rb/rspec-with_params.svg)](https://rubygems.org/gems/rspec-with_params) [![CircleCI](https://circleci.com/gh/odlp/rspec-with_params.svg?style=shield)](https://circleci.com/gh/odlp/rspec-with_params)
4
+
5
+ Simple parameterized testing (a.k.a table tests) with RSpec.
5
6
 
6
7
  ```ruby
7
8
  RSpec.describe "my complex business logic" do
@@ -11,7 +12,7 @@ RSpec.describe "my complex business logic" do
11
12
  [:today, :schedule, :expected_date],
12
13
  ["2019-06-05", "weekly", "2019-06-13"],
13
14
  ["2019-06-05", "bi-weekly", "2019-06-20"],
14
- ["2019-06-05", "monthly", "2019-06-20"],
15
+ ["2019-06-05", "monthly", "2019-07-13"],
15
16
  ) do
16
17
  it "determines the next appointment date" do
17
18
  result = NextAppointmentCalculator.new.process(today, schedule)
@@ -68,9 +69,18 @@ RSpec.configure do |config|
68
69
  end
69
70
  ```
70
71
 
72
+ ## Development
73
+
74
+ ```
75
+ git clone git@github.com:odlp/rspec-with_params.git
76
+ cd rspec-with_params
77
+ bundle
78
+ bundle exec rake
79
+ ```
80
+
71
81
  ## Alternatives
72
82
 
73
- - [`rspec-parameterized`][rspec-parameterized] - A more-complex, slicker DSL.
83
+ - [`rspec-parameterized`][rspec-parameterized] - A slicker (more-complex?) DSL.
74
84
  Inspiration for this library.
75
85
 
76
86
  [rspec-parameterized]: https://github.com/tomykaira/rspec-parameterized
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rspec/with_params/version"
2
4
 
3
5
  module RSpec
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RSpec
2
4
  module WithParams
3
5
  module DSL
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RSpec
2
4
  module WithParams
3
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
4
6
  end
5
7
  end
@@ -20,8 +20,13 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
+ spec.required_ruby_version = "~> 2.4"
24
+
25
+ spec.add_dependency "rspec", "~> 3.0"
26
+
23
27
  spec.add_development_dependency "bundler", "~> 1.17"
24
28
  spec.add_development_dependency "rake", "~> 10.0"
25
29
  spec.add_development_dependency "rspec", "~> 3.8"
26
30
  spec.add_development_dependency "jet_black", "~> 0.5"
31
+ spec.add_development_dependency "rspec_junit_formatter" if ENV.key?("CI")
27
32
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-with_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Peate
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-12 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,9 +86,11 @@ executables: []
72
86
  extensions: []
73
87
  extra_rdoc_files: []
74
88
  files:
89
+ - ".circleci/config.yml"
75
90
  - ".gitignore"
76
91
  - ".rspec"
77
92
  - ".travis.yml"
93
+ - CHANGELOG.md
78
94
  - Gemfile
79
95
  - Gemfile.lock
80
96
  - LICENSE.txt
@@ -96,9 +112,9 @@ require_paths:
96
112
  - lib
97
113
  required_ruby_version: !ruby/object:Gem::Requirement
98
114
  requirements:
99
- - - ">="
115
+ - - "~>"
100
116
  - !ruby/object:Gem::Version
101
- version: '0'
117
+ version: '2.4'
102
118
  required_rubygems_version: !ruby/object:Gem::Requirement
103
119
  requirements:
104
120
  - - ">="