--- Begin Message ---
Package: ruby-six
Severity: minor
Tags: patch
User: [email protected]
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)
--- a/spec/six_rules_packs_spec.rb
+++ b/spec/six_rules_packs_spec.rb
@@ -9,7 +9,7 @@
let(:rules) { BookRules.new }
describe "<<" do
- it { (abilities << rules).should be_true }
+ it { (abilities << rules).should be_truthy }
it { lambda { abilities << nil }.should raise_error(Six::InvalidPackPassed) }
it_should_behave_like :valid_abilities do
@@ -21,12 +21,12 @@
end
describe :add do
- it { abilities.add(:global, rules).should be_true }
- it { abilities.add(:wrong, nil).should be_false }
+ it { abilities.add(:global, rules).should be_truthy }
+ it { abilities.add(:wrong, nil).should be_falsey }
end
describe :add! do
- it { abilities.add!(:global, rules).should be_true }
+ it { abilities.add!(:global, rules).should be_truthy }
it { lambda { abilities.add!(:wrong, nil)}.should raise_error(Six::InvalidPackPassed) }
end
@@ -45,7 +45,7 @@
end
it "should return false when trying to use unexisting pack" do
- abilities.use(:noname).should be_false
+ abilities.use(:noname).should be_falsey
end
end
@@ -75,12 +75,12 @@
before { abilities.add(:global, rules) }
describe :remove do
- it { abilities.remove(:global).should be_true }
- it { abilities.remove(:zzz).should be_false }
+ it { abilities.remove(:global).should be_truthy }
+ it { abilities.remove(:zzz).should be_falsey }
end
describe :remove! do
- it { abilities.remove!(:global).should be_true }
+ it { abilities.remove!(:global).should be_truthy }
it { lambda { abilities.remove!(:zzz)}.should raise_error(Six::NoPackError) }
end
end
@@ -94,16 +94,16 @@
Object.new
end
- it { abilities.valid_rules_object?(BookRules.new).should be_true }
- it { abilities.valid_rules_object?(invalid_with_allowed).should be_false }
- it { abilities.valid_rules_object?(invalid_wo_allowed).should be_false }
+ it { abilities.valid_rules_object?(BookRules.new).should be_truthy }
+ it { abilities.valid_rules_object?(invalid_with_allowed).should be_falsey }
+ it { abilities.valid_rules_object?(invalid_wo_allowed).should be_falsey }
end
describe :pack_exist? do
before { abilities.add(:global, rules) }
- it { abilities.pack_exist?(:global).should be_true }
- it { abilities.pack_exist?(:ufo).should be_false }
+ it { abilities.pack_exist?(:global).should be_truthy }
+ it { abilities.pack_exist?(:ufo).should be_falsey }
end
end
end
--- a/spec/support/valid_abilities_example.rb
+++ b/spec/support/valid_abilities_example.rb
@@ -19,38 +19,38 @@
describe "should return true or false depend on access" do
context :read_book do
- it { allowed?(@jim, :read_book, @jims_book).should be_true }
- it { allowed?(@mike, :read_book, @mikes_book).should be_true }
- it { allowed?(@jim, :read_book, @mikes_book).should be_true }
- it { allowed?(@mike, :read_book, @jims_book).should be_true }
+ it { allowed?(@jim, :read_book, @jims_book).should be_truthy }
+ it { allowed?(@mike, :read_book, @mikes_book).should be_truthy }
+ it { allowed?(@jim, :read_book, @mikes_book).should be_truthy }
+ it { allowed?(@mike, :read_book, @jims_book).should be_truthy }
end
context :rate_book do
- it { allowed?(@jim, :rate_book, @jims_book).should be_false }
- it { allowed?(@mike, :rate_book, @mikes_book).should be_false }
- it { allowed?(@jim, :rate_book, @mikes_book).should be_true }
- it { allowed?(@mike, :rate_book, @jims_book).should be_true }
+ it { allowed?(@jim, :rate_book, @jims_book).should be_falsey }
+ it { allowed?(@mike, :rate_book, @mikes_book).should be_falsey }
+ it { allowed?(@jim, :rate_book, @mikes_book).should be_truthy }
+ it { allowed?(@mike, :rate_book, @jims_book).should be_truthy }
end
context :edit_book do
- it { allowed?(@jim, :edit_book, @jims_book).should be_true }
- it { allowed?(@mike,:edit_book, @mikes_book).should be_true }
- it { allowed?(@jim, :edit_book, @mikes_book).should be_false }
- it { allowed?(@mike,:edit_book, @jims_book).should be_false }
+ it { allowed?(@jim, :edit_book, @jims_book).should be_truthy }
+ it { allowed?(@mike,:edit_book, @mikes_book).should be_truthy }
+ it { allowed?(@jim, :edit_book, @mikes_book).should be_falsey }
+ it { allowed?(@mike,:edit_book, @jims_book).should be_falsey }
end
context :publish_book do
- it { allowed?(@jim, :publish_book, @jims_book).should be_false }
- it { allowed?(@mike,:publish_book, @mikes_book).should be_false }
- it { allowed?(@jim, :publish_book, @mikes_book).should be_false }
- it { allowed?(@mike,:publish_book, @jims_book).should be_false }
+ it { allowed?(@jim, :publish_book, @jims_book).should be_falsey }
+ it { allowed?(@mike,:publish_book, @mikes_book).should be_falsey }
+ it { allowed?(@jim, :publish_book, @mikes_book).should be_falsey }
+ it { allowed?(@mike,:publish_book, @jims_book).should be_falsey }
end
context 'passing multiple actions' do
- it { allowed?(@jim, [:read_book, :edit_book], @jims_book).should be_true }
- it { allowed?(@jim, [:ead_book, :publish_book, :edit_book], @jims_book).should be_false }
- it { allowed?(@mike, [:read_book, :edit_book], @mikes_book).should be_true }
- it { allowed?(@mike, [:rate_book, :publish_book, :edit_book], @mikes_book).should be_false }
+ it { allowed?(@jim, [:read_book, :edit_book], @jims_book).should be_truthy }
+ it { allowed?(@jim, [:ead_book, :publish_book, :edit_book], @jims_book).should be_falsey }
+ it { allowed?(@mike, [:read_book, :edit_book], @mikes_book).should be_truthy }
+ it { allowed?(@mike, [:rate_book, :publish_book, :edit_book], @mikes_book).should be_falsey }
end
end
end
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,3 +2,7 @@
#require "bundler"
#Bundler.require(:default, :development)
Dir[File.dirname(__FILE__) + '/support/*.rb'].each {|file| require file }
+
+RSpec.configure do |config|
+ config.expect_with(:rspec) { |c| c.syntax = :should }
+end
signature.asc
Description: Digital signature
--- End Message ---