rspec-collection_matchers 1.1.3 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9d94581983b7d44a39df551b7f66f2ae28c00a32
4
- data.tar.gz: aa1cff25eda40661701a3d4220f374e15e955169
2
+ SHA256:
3
+ metadata.gz: e43660c5a2622eb036fd9c25df4db49d446d347544eb96c8a4358d9960c8bb57
4
+ data.tar.gz: d6ab46976808a1f520e7234f0322589215d17316d5d5bc005dd7c50eaf89a33a
5
5
  SHA512:
6
- metadata.gz: 5c756c81ecbb2041a58583c8630f0daa752f6b6b017eae2acf105c06a3b4a1e34ac57d4f65acba1e1b2779a2b226783429eb7d1c923767e18d34070de0740fef
7
- data.tar.gz: fd0ffd413ea9306c0f105d538584e7f0a9d62d70371994cfe929aa1838883b4f8efd906fc7ca5cfb022c1eadcacc1602fb586461407b566bc06ecf2b61416543
6
+ metadata.gz: ae4028c0f65583927c66b5917e33647cd4e56369147d1e5eda0d0dab714bc62e1c103349c32d74e2eebed3b5d14b4bfef12d6dc916ca54de2591205fe39f30b4
7
+ data.tar.gz: bc98fed176296eea54ef79db04cf74b036a6399d11a9bfdc521458ac24c09224245d385acffb75f0da949392d4567c9d4d31aa7b460137e6fc36bc00d7ea6071
@@ -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 install bundler
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
@@ -1,4 +1,8 @@
1
- ### Development
1
+ ### 1.2.0 / 2019-09-18
2
+
3
+ Enhancements:
4
+
5
+ * Add a `have` matcher alias for `a_collection_having` (Hugo Baraúna, #25)
2
6
 
3
7
  Bug Fixes:
4
8
 
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", "< 2"
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
@@ -3,7 +3,9 @@
3
3
  RSpec::CollectionMatchers lets you express expected outcomes on collections
4
4
  of an object in an example.
5
5
 
6
- expect(account.shopping_cart).to have_exactly(3).items
6
+ ```ruby
7
+ expect(account.shopping_cart).to have_exactly(3).items
8
+ ```
7
9
 
8
10
  ## Install
9
11
 
@@ -34,6 +34,7 @@ module RSpec
34
34
  RSpec::CollectionMatchers::Have.new(n)
35
35
  end
36
36
  alias :have_exactly :have
37
+ alias :a_collection_having :have
37
38
 
38
39
  # Exactly like have() with >=.
39
40
  #
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module CollectionMatchers
3
- VERSION = "1.1.3"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -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", "~> 1.3"
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 eq "should have 3 players"
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 eq "should have at least 2 players"
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 eq "should have at most 4 players"
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.1.3
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: 2016-12-21 00:00:00.000000000 Z
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
- rubyforge_project:
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.1.3
112
+ summary: rspec-collection_matchers-1.2.0
109
113
  test_files:
110
114
  - features/have.feature
111
115
  - features/support/env.rb