File: rspec3.patch

package info (click to toggle)
ruby-multi-xml 0.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 220 kB
  • ctags: 68
  • sloc: ruby: 1,108; makefile: 2
file content (59 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From a4ae6aa9810ab44634df977f9d0d37efb785c45c Mon Sep 17 00:00:00 2001
From: Erik Michaels-Ober <sferik@gmail.com>
Date: Sat, 9 Nov 2013 07:29:35 -0500
Subject: [PATCH] Prepare for rspec 3.0
Bug: https://github.com/sferik/multi_xml/commit/a4ae6aa9810ab44634df977f9d0d37efb785c45c

---
 spec/parser_shared_example.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/spec/parser_shared_example.rb b/spec/parser_shared_example.rb
index 82d1645..f3dbd00 100644
--- a/spec/parser_shared_example.rb
+++ b/spec/parser_shared_example.rb
@@ -145,7 +145,7 @@
           context "when #{boolean}" do
             it "returns #{boolean}" do
               xml = "<tag type=\"boolean\">#{boolean}</tag>"
-              expect(MultiXml.parse(xml)['tag']).to instance_eval("be_#{boolean}")
+              expect(MultiXml.parse(xml)['tag']).to be instance_eval(boolean)
             end
           end
         end
@@ -156,7 +156,7 @@
           end
 
           it "returns true" do
-            expect(MultiXml.parse(@xml)['tag']).to be_true
+            expect(MultiXml.parse(@xml)['tag']).to be true
           end
         end
 
@@ -166,7 +166,7 @@
           end
 
           it "returns false" do
-            expect(MultiXml.parse(@xml)['tag']).to be_false
+            expect(MultiXml.parse(@xml)['tag']).to be false
           end
         end
       end
@@ -428,7 +428,7 @@
           end
 
           it "returns nil" do
-            expect(MultiXml.parse(@xml)['tag']).to be_nil
+            expect(MultiXml.parse(@xml)['tag']).to be nil
           end
         end
       end
@@ -444,7 +444,7 @@
           end
 
           it "returns nil when the type is allowed" do
-            expect(MultiXml.parse(@xml, :disallowed_types => [])['tag']).to be_nil
+            expect(MultiXml.parse(@xml, :disallowed_types => [])['tag']).to be nil
           end
         end
       end