rspec-collection_matchers 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +15 -8
- data/Changelog.md +5 -1
- data/Gemfile +2 -1
- data/README.md +3 -1
- data/lib/rspec/collection_matchers/matchers.rb +1 -0
- data/lib/rspec/collection_matchers/version.rb +1 -1
- data/rspec-collection_matchers.gemspec +9 -1
- data/spec/rspec/collection_matchers/have_spec.rb +18 -3
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e43660c5a2622eb036fd9c25df4db49d446d347544eb96c8a4358d9960c8bb57
|
4
|
+
data.tar.gz: d6ab46976808a1f520e7234f0322589215d17316d5d5bc005dd7c50eaf89a33a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae4028c0f65583927c66b5917e33647cd4e56369147d1e5eda0d0dab714bc62e1c103349c32d74e2eebed3b5d14b4bfef12d6dc916ca54de2591205fe39f30b4
|
7
|
+
data.tar.gz: bc98fed176296eea54ef79db04cf74b036a6399d11a9bfdc521458ac24c09224245d385acffb75f0da949392d4567c9d4d31aa7b460137e6fc36bc00d7ea6071
|
data/.travis.yml
CHANGED
@@ -2,16 +2,23 @@ language: ruby
|
|
2
2
|
script: "script/test_all"
|
3
3
|
bundler_args: "--standalone --binstubs --without documentation"
|
4
4
|
before_install:
|
5
|
-
- gem update --system
|
6
|
-
- gem
|
5
|
+
- gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
|
6
|
+
- gem update bundler --conservative
|
7
|
+
|
8
|
+
# In order to install old Rubies, we need to use old Ubuntu distibution.
|
9
|
+
dist: trusty
|
10
|
+
|
7
11
|
rvm:
|
8
|
-
- 2.3.3
|
9
|
-
- 2.2.5
|
10
|
-
- 2.1
|
11
|
-
- 2.0.0
|
12
|
-
- 1.9.3
|
13
|
-
- 1.9.2
|
14
12
|
- 1.8.7
|
13
|
+
- 1.9.2
|
14
|
+
- 1.9.3
|
15
|
+
- 2.0.0
|
16
|
+
- 2.1
|
17
|
+
- 2.2.10
|
18
|
+
- 2.3.8
|
19
|
+
- 2.4.6
|
20
|
+
- 2.5.5
|
21
|
+
- 2.6.3
|
15
22
|
- ree
|
16
23
|
- jruby-19mode
|
17
24
|
- jruby-18mode
|
data/Changelog.md
CHANGED
data/Gemfile
CHANGED
@@ -39,7 +39,8 @@ gem "activesupport", *rails_gem_args
|
|
39
39
|
gem "activemodel", *rails_gem_args
|
40
40
|
|
41
41
|
if RUBY_VERSION.to_f < 2
|
42
|
-
gem "cucumber", "
|
42
|
+
gem "cucumber", "~> 1.3.20"
|
43
|
+
gem "contracts", "0.15.0" # doesn't work on Ruby 1.9.3
|
43
44
|
gem 'json', '< 2'
|
44
45
|
gem 'term-ansicolor', '< 1.4.0' # used by cucumber
|
45
46
|
gem 'tins', '~> 1.6.0' # used by term-ansicolor
|
data/README.md
CHANGED
@@ -13,6 +13,14 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/rspec/rspec-collection_matchers"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
+
spec.metadata = {
|
17
|
+
'bug_tracker_uri' => 'https://github.com/rspec/rspec-collection_matchers/issues',
|
18
|
+
'changelog_uri' => "https://github.com/rspec/rspec-collection_matchers/blob/v#{spec.version}/Changelog.md",
|
19
|
+
'documentation_uri' => 'https://rspec.info/documentation/',
|
20
|
+
'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/rspec',
|
21
|
+
'source_code_uri' => 'https://github.com/rspec/rspec-collection_matchers',
|
22
|
+
}
|
23
|
+
|
16
24
|
spec.files = `git ls-files`.split($/)
|
17
25
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
26
|
spec.test_files = spec.files.grep(%r{^(spec|features)/})
|
@@ -20,6 +28,6 @@ Gem::Specification.new do |spec|
|
|
20
28
|
|
21
29
|
spec.add_runtime_dependency "rspec-expectations", ">= 2.99.0.beta1"
|
22
30
|
|
23
|
-
spec.add_development_dependency "bundler", "
|
31
|
+
spec.add_development_dependency "bundler", ">= 1.3"
|
24
32
|
spec.add_development_dependency "activemodel", ">= 3.0"
|
25
33
|
end
|
@@ -428,6 +428,21 @@ EOF
|
|
428
428
|
expect([1, 2, 3]).to be_truthy.or have(3).items
|
429
429
|
end
|
430
430
|
end
|
431
|
+
|
432
|
+
context "using the have matcher as an argument of another matcher" do
|
433
|
+
it "has an alias for the have matcher" do
|
434
|
+
word = "hi"
|
435
|
+
|
436
|
+
expect {
|
437
|
+
word = "hey"
|
438
|
+
}.to change { word }.
|
439
|
+
from( a_collection_having(2).letters ).
|
440
|
+
to( a_collection_having(3).letters )
|
441
|
+
end
|
442
|
+
|
443
|
+
it "has an alias for the have_at_most matcher"
|
444
|
+
it "has an alias for the have_at_least matcher"
|
445
|
+
end
|
431
446
|
end
|
432
447
|
|
433
448
|
describe RSpec::CollectionMatchers::Have, "for a collection owner that implements #send" do
|
@@ -523,21 +538,21 @@ EOF
|
|
523
538
|
describe "the have matcher" do
|
524
539
|
it "generates its own description" do
|
525
540
|
expect(team).to have(3).players
|
526
|
-
expect(RSpec::Matchers.generated_description).to
|
541
|
+
expect(RSpec::Matchers.generated_description).to match /have 3 players$/
|
527
542
|
end
|
528
543
|
end
|
529
544
|
|
530
545
|
describe "the have_at_least matcher"do
|
531
546
|
it "generates its own description" do
|
532
547
|
expect(team).to have_at_least(2).players
|
533
|
-
expect(RSpec::Matchers.generated_description).to
|
548
|
+
expect(RSpec::Matchers.generated_description).to match /have at least 2 players$/
|
534
549
|
end
|
535
550
|
end
|
536
551
|
|
537
552
|
describe "the have_at_most matcher" do
|
538
553
|
it "generates its own description" do
|
539
554
|
expect(team).to have_at_most(4).players
|
540
|
-
expect(RSpec::Matchers.generated_description).to
|
555
|
+
expect(RSpec::Matchers.generated_description).to match /have at most 4 players$/
|
541
556
|
end
|
542
557
|
end
|
543
558
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-collection_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hugo Baraúna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-expectations
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
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
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -85,7 +85,12 @@ files:
|
|
85
85
|
homepage: https://github.com/rspec/rspec-collection_matchers
|
86
86
|
licenses:
|
87
87
|
- MIT
|
88
|
-
metadata:
|
88
|
+
metadata:
|
89
|
+
bug_tracker_uri: https://github.com/rspec/rspec-collection_matchers/issues
|
90
|
+
changelog_uri: https://github.com/rspec/rspec-collection_matchers/blob/v1.2.0/Changelog.md
|
91
|
+
documentation_uri: https://rspec.info/documentation/
|
92
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
93
|
+
source_code_uri: https://github.com/rspec/rspec-collection_matchers
|
89
94
|
post_install_message:
|
90
95
|
rdoc_options: []
|
91
96
|
require_paths:
|
@@ -101,11 +106,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
106
|
- !ruby/object:Gem::Version
|
102
107
|
version: '0'
|
103
108
|
requirements: []
|
104
|
-
|
105
|
-
rubygems_version: 2.6.8
|
109
|
+
rubygems_version: 3.0.3
|
106
110
|
signing_key:
|
107
111
|
specification_version: 4
|
108
|
-
summary: rspec-collection_matchers-1.
|
112
|
+
summary: rspec-collection_matchers-1.2.0
|
109
113
|
test_files:
|
110
114
|
- features/have.feature
|
111
115
|
- features/support/env.rb
|