File: 02_add_support_for_ruby_2.4.1.diff

package info (click to toggle)
ruby-json-spec 1.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 312 kB
  • sloc: ruby: 1,059; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,831 bytes parent folder | download | duplicates (3)
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
Description: Support Ruby 2.4.1
 This PR adds Ruby 2.4.1 to the Travis CI matrix.
 .
 To pass tests on 2.4, it avoids the Fixnum class.
 .
 Also: all EOL'd Ruby versions are now in the allow_failures list. 
Author: Olle Jonsson <olle.jonsson@gmail.com>
Origin: upstream, https://github.com/collectiveidea/json_spec/commit/c9c899fae704ea66c1a7bab68c8cf086053724ff.patch
Bug: https://github.com/collectiveidea/json_spec/pull/99
Bug-Debian: https://bugs.debian.org/888129
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: https://github.com/collectiveidea/json_spec/pull/99
Reviewed-By: Steve Richert <steve.richert@gmail.com>
Last-Update: 2017-05-16

--- ruby-json-spec-1.1.5.orig/.travis.yml
+++ ruby-json-spec-1.1.5/.travis.yml
@@ -9,9 +9,11 @@ matrix:
   allow_failures:
     - rvm: ruby-head
     - rvm: "2.0"
+    - rvm: "2.1"
 rvm:
   - "2.0"
   - "2.1"
-  - "2.2"
+  - "2.2.7"
   - "2.3.4"
+  - "2.4.1"
   - ruby-head
--- ruby-json-spec-1.1.5.orig/spec/json_spec/matchers/have_json_type_spec.rb
+++ ruby-json-spec-1.1.5/spec/json_spec/matchers/have_json_type_spec.rb
@@ -55,9 +55,10 @@ describe JsonSpec::Matchers::HaveJsonTyp
 
   it "provides a failure message for negation" do
     matcher = have_json_type(Numeric)
-    matcher.matches?(%(10))
-    matcher.failure_message_when_negated.should   eq "Expected JSON value type to not be Numeric, got Fixnum"
-    matcher.failure_message_for_should_not.should eq "Expected JSON value type to not be Numeric, got Fixnum" # RSpec 2 interface
+    matcher.matches?(%(10.0))
+
+    matcher.failure_message_when_negated.should   eq "Expected JSON value type to not be Numeric, got Float"
+    matcher.failure_message_for_should_not.should eq "Expected JSON value type to not be Numeric, got Float" # RSpec 2 interface
   end
 
   it "provides a description message" do