1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: fix syntax of RSpec shared examples groups
to make it work with recent versions of RSpec
Origin: vendor
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2014-03-07
--- a/spec/enumerable_examples.rb
+++ b/spec/enumerable_examples.rb
@@ -1,4 +1,4 @@
-shared_examples_for Enumerable, Multimap, "with inital values {'a' => [100], 'b' => [200, 300]}" do
+shared_examples_for "Enumerable Multimap with inital values {'a' => [100], 'b' => [200, 300]}" do
it "should check all key/value pairs for condition" do
@map.all? { |key, value| key =~ /\w/ }.should be_true
@map.all? { |key, value| key =~ /\d/ }.should be_false
--- a/spec/hash_examples.rb
+++ b/spec/hash_examples.rb
@@ -1,4 +1,4 @@
-shared_examples_for Hash, Multimap, "with inital values {'a' => [100], 'b' => [200, 300]}" do
+shared_examples "Hash Multimap with inital values {'a' => [100], 'b' => [200, 300]}" do
before do
@container ||= Array
end
--- a/spec/set_examples.rb
+++ b/spec/set_examples.rb
@@ -1,4 +1,4 @@
-shared_examples_for Set do
+shared_examples_for "Set" do
it "should create a new set containing the given objects" do
Multiset[]
Multiset[nil]
@@ -267,7 +267,7 @@
end
end
-shared_examples_for Set, "with inital values [1, 2]" do
+shared_examples_for "Set with inital values [1, 2]" do
it "should add element to set" do
@set.add("foo")
|