Package: ruby-powerpack
Severity: minor
Tags: patch
User: pkg-ruby-extras-maintain...@lists.alioth.debian.org
Usertags: rspec3

Dear maintainer,

This package uses the RSpec framework for the tests. RSpec v2 currently in
unstable will soon be replaced by the v3, already present in experimental.

Many deprecated features in RSpec2 are now errors in RSpec3 and the test suite
as is will fail with RSpec3. Please find attached a patch to adapt the test
suite to RSpec3. Feel free to update it and forward it upstream.

Best wishes,

For the Debian Ruby team,

Cédric

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/spec/powerpack/enumerable/exactly_spec.rb b/spec/powerpack/enumerable/exactly_spec.rb
index 18ed687..8aa011a 100644
--- a/spec/powerpack/enumerable/exactly_spec.rb
+++ b/spec/powerpack/enumerable/exactly_spec.rb
@@ -3,37 +3,37 @@ require 'spec_helper'
 describe 'Enumerable#exactly' do
   context 'with block' do
     it 'returns true for exact number of matches' do
-      expect([1, 2, 3, 4].exactly?(2, &:even?)).to be_true
+      expect([1, 2, 3, 4].exactly?(2, &:even?)).to be_truthy
     end
 
     it 'returns false for less matches' do
-      expect([1, 3, 4].exactly?(2, &:even?)).to be_false
+      expect([1, 3, 4].exactly?(2, &:even?)).to be_falsey
     end
 
     it 'returns false for more matches' do
-      expect([1, 3, 4, 6, 8].exactly?(2, &:even?)).to be_false
+      expect([1, 3, 4, 6, 8].exactly?(2, &:even?)).to be_falsey
     end
   end
 
   context 'without block' do
     it 'returns true for exact number of non nil/false elements in absence of nil/false elements' do
-      expect([1, 2, 3, 4].exactly?(4)).to be_true
+      expect([1, 2, 3, 4].exactly?(4)).to be_truthy
     end
 
     it 'returns true for exact number of non nil/false elements in presence of nil/false elements' do
-      expect([1, 2, nil, false].exactly?(2)).to be_true
+      expect([1, 2, nil, false].exactly?(2)).to be_truthy
     end
 
     it 'returns true for exact number of nil/false elements' do
-      expect([nil, false].exactly?(0)).to be_true
+      expect([nil, false].exactly?(0)).to be_truthy
     end
 
     it 'returns false if there are less non nil/false elements in absence of nil/false elements' do
-      expect([1, 2, 3].exactly?(4)).to be_false
+      expect([1, 2, 3].exactly?(4)).to be_falsey
     end
 
     it 'returns false if there are less non nil/false elements in presence of nil/false elements' do
-      expect([1, nil, false].exactly?(4)).to be_false
+      expect([1, nil, false].exactly?(4)).to be_falsey
     end
   end
 end
diff --git a/spec/powerpack/enumerable/several_spec.rb b/spec/powerpack/enumerable/several_spec.rb
index e8f972e..85d053f 100644
--- a/spec/powerpack/enumerable/several_spec.rb
+++ b/spec/powerpack/enumerable/several_spec.rb
@@ -3,25 +3,25 @@ require 'spec_helper'
 describe 'Enumerable#several' do
   context 'with block' do
     it 'returns true if more than 1 element matches the predicate' do
-      expect([1, 2, 3, 4].several?(&:even?)).to be_true
+      expect([1, 2, 3, 4].several?(&:even?)).to be_truthy
     end
 
     it 'returns false if just 1 element matches the predicate' do
-      expect([1, 3, 4].several?(&:even?)).to be_false
+      expect([1, 3, 4].several?(&:even?)).to be_falsey
     end
 
     it 'returns false if no elements match the predicate' do
-      expect([1, 3, 4].several?(&:even?)).to be_false
+      expect([1, 3, 4].several?(&:even?)).to be_falsey
     end
   end
 
   context 'without block' do
     it 'returns true if there are 2 or more non nil/false elements' do
-      expect([1, 2, 3, 4].several?).to be_true
+      expect([1, 2, 3, 4].several?).to be_truthy
     end
 
     it 'returns false if there are less than 2 non nil/false elements' do
-      expect([1, nil, false].several?).to be_false
+      expect([1, nil, false].several?).to be_falsey
     end
   end
 end
diff --git a/spec/powerpack/numeric/neg_spec.rb b/spec/powerpack/numeric/neg_spec.rb
index e8da75a..af586da 100644
--- a/spec/powerpack/numeric/neg_spec.rb
+++ b/spec/powerpack/numeric/neg_spec.rb
@@ -2,23 +2,23 @@ require 'spec_helper'
 
 describe 'Numeric#neg?' do
   it 'returns false for positive integer' do
-    expect(1.neg?).to be_false
+    expect(1.neg?).to be_falsey
   end
 
   it 'returns false for positive float' do
-    expect(0.1.neg?).to be_false
+    expect(0.1.neg?).to be_falsey
   end
 
   it 'returns true for negative integer' do
-    expect(-1.neg?).to be_true
+    expect(-1.neg?).to be_truthy
   end
 
   it 'returns true for negative float' do
-    expect(-0.01.neg?).to be_true
+    expect(-0.01.neg?).to be_truthy
   end
 
   it 'returns false for 0' do
-    expect(0.neg?).to be_false
-    expect(0.0.neg?).to be_false
+    expect(0.neg?).to be_falsey
+    expect(0.0.neg?).to be_falsey
   end
 end
diff --git a/spec/powerpack/numeric/pos_spec.rb b/spec/powerpack/numeric/pos_spec.rb
index fe265b1..b7d92cc 100644
--- a/spec/powerpack/numeric/pos_spec.rb
+++ b/spec/powerpack/numeric/pos_spec.rb
@@ -2,23 +2,23 @@ require 'spec_helper'
 
 describe 'Numeric#pos?' do
   it 'returns true for positive integer' do
-    expect(1.pos?).to be_true
+    expect(1.pos?).to be_truthy
   end
 
   it 'returns true for positive float' do
-    expect(0.1.pos?).to be_true
+    expect(0.1.pos?).to be_truthy
   end
 
   it 'returns false for negative integer' do
-    expect(-1.pos?).to be_false
+    expect(-1.pos?).to be_falsey
   end
 
   it 'returns false for negative float' do
-    expect(-0.01.pos?).to be_false
+    expect(-0.01.pos?).to be_falsey
   end
 
   it 'returns false for 0' do
-    expect(0.pos?).to be_false
-    expect(0.0.pos?).to be_false
+    expect(0.pos?).to be_falsey
+    expect(0.0.pos?).to be_falsey
   end
 end
diff --git a/spec/powerpack/string/blank_spec.rb b/spec/powerpack/string/blank_spec.rb
index 68e42f2..f311fc4 100644
--- a/spec/powerpack/string/blank_spec.rb
+++ b/spec/powerpack/string/blank_spec.rb
@@ -2,14 +2,14 @@ require 'spec_helper'
 
 describe 'String#blank?' do
   it 'returns true for an empty string' do
-    expect(''.blank?).to be_true
+    expect(''.blank?).to be_truthy
   end
 
   it 'returns true for a string with only whitespace in it' do
-    expect('     '.blank?).to be_true
+    expect('     '.blank?).to be_truthy
   end
 
   it 'returns false for a string with non-whitespace chars in it' do
-    expect('   test'.blank?).to be_false
+    expect('   test'.blank?).to be_falsey
   end
 end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 35cf98f..25a67d0 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -5,8 +5,6 @@ require 'rspec'
 require 'powerpack'
 
 RSpec.configure do |config|
-  config.treat_symbols_as_metadata_keys_with_true_values = true
-
   config.expect_with :rspec do |c|
     c.syntax = :expect # disables `should`
   end

Attachment: signature.asc
Description: Digital signature

Reply via email to