Description: Fix tests to run with RSpec 3.x
 RSpec 3.x redefined the matchers like be_true and be_false to be_truthy and 
 be_falsey respectively. Fixing the tests to follow those modifications.
Author: Balasankar C <balasankarc@autistici.org>
Last-Update: 2015-07-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/encoding/encoding_spec.rb
+++ b/spec/encoding/encoding_spec.rb
@@ -225,7 +225,7 @@
       nilpassed = true if chunk.nil?
       s << chunk
     end
-    nilpassed.should be_true
+    nilpassed.should be_truthy
     s.rewind
     s.read.should eql("{\"foo\":\"bar\"}")
   end
@@ -312,4 +312,4 @@
       Yajl::Encoder.encode(root)
     }.should raise_error(Yajl::EncodeError)
   end
-end
\ No newline at end of file
+end
--- a/spec/json_gem_compatibility/compatibility_spec.rb
+++ b/spec/json_gem_compatibility/compatibility_spec.rb
@@ -7,40 +7,40 @@
   it "shoud not mixin #to_json on base objects until compatability has been enabled" do
     d = Dummy.new
 
-    d.respond_to?(:to_json).should_not be_true
-    "".respond_to?(:to_json).should_not be_true
-    1.respond_to?(:to_json).should_not be_true
-    "1.5".to_f.respond_to?(:to_json).should_not be_true
-    [].respond_to?(:to_json).should_not be_true
-    {:foo => "bar"}.respond_to?(:to_json).should_not be_true
-    true.respond_to?(:to_json).should_not be_true
-    false.respond_to?(:to_json).should_not be_true
-    nil.respond_to?(:to_json).should_not be_true
+    d.respond_to?(:to_json).should_not be_truthy
+    "".respond_to?(:to_json).should_not be_truthy
+    1.respond_to?(:to_json).should_not be_truthy
+    "1.5".to_f.respond_to?(:to_json).should_not be_truthy
+    [].respond_to?(:to_json).should_not be_truthy
+    {:foo => "bar"}.respond_to?(:to_json).should_not be_truthy
+    true.respond_to?(:to_json).should_not be_truthy
+    false.respond_to?(:to_json).should_not be_truthy
+    nil.respond_to?(:to_json).should_not be_truthy
   end
 
   it "should mixin #to_json on base objects after compatability has been enabled" do
     require 'yajl/json_gem'
     d = Dummy.new
 
-    d.respond_to?(:to_json).should be_true
-    "".respond_to?(:to_json).should be_true
-    1.respond_to?(:to_json).should be_true
-    "1.5".to_f.respond_to?(:to_json).should be_true
-    [].respond_to?(:to_json).should be_true
-    {:foo => "bar"}.respond_to?(:to_json).should be_true
-    true.respond_to?(:to_json).should be_true
-    false.respond_to?(:to_json).should be_true
-    nil.respond_to?(:to_json).should be_true
+    d.respond_to?(:to_json).should be_truthy
+    "".respond_to?(:to_json).should be_truthy
+    1.respond_to?(:to_json).should be_truthy
+    "1.5".to_f.respond_to?(:to_json).should be_truthy
+    [].respond_to?(:to_json).should be_truthy
+    {:foo => "bar"}.respond_to?(:to_json).should be_truthy
+    true.respond_to?(:to_json).should be_truthy
+    false.respond_to?(:to_json).should be_truthy
+    nil.respond_to?(:to_json).should be_truthy
   end
 
   it "should require yajl/json_gem to enable the compatability API" do
-    defined?(JSON).should be_true
+    defined?(JSON).should be_truthy
 
-    JSON.respond_to?(:parse).should be_true
-    JSON.respond_to?(:generate).should be_true
-    JSON.respond_to?(:pretty_generate).should be_true
-    JSON.respond_to?(:load).should be_true
-    JSON.respond_to?(:dump).should be_true
+    JSON.respond_to?(:parse).should be_truthy
+    JSON.respond_to?(:generate).should be_truthy
+    JSON.respond_to?(:pretty_generate).should be_truthy
+    JSON.respond_to?(:load).should be_truthy
+    JSON.respond_to?(:dump).should be_truthy
   end
 
   it "should allow default parsing options be set with JSON.default_options" do
@@ -70,9 +70,9 @@
   end
 
   it "should have the standard parsing and encoding exceptions mapped" do
-    JSON::JSONError.new.is_a?(StandardError).should be_true
-    JSON::ParserError.new.is_a?(JSON::JSONError).should be_true
-    JSON::GeneratorError.new.is_a?(JSON::JSONError).should be_true
+    JSON::JSONError.new.is_a?(StandardError).should be_truthy
+    JSON::ParserError.new.is_a?(JSON::JSONError).should be_truthy
+    JSON::GeneratorError.new.is_a?(JSON::JSONError).should be_truthy
 
     lambda {
       JSON.parse("blah")
