test/test_datafile.rb in avro-1.8.2 vs test/test_datafile.rb in avro-1.9.0
- old
+ new
@@ -18,17 +18,17 @@
require 'test_help'
class TestDataFile < Test::Unit::TestCase
HERE = File.expand_path File.dirname(__FILE__)
def setup
- if File.exists?(HERE + '/data.avr')
+ if File.exist?(HERE + '/data.avr')
File.unlink(HERE + '/data.avr')
end
end
def teardown
- if File.exists?(HERE + '/data.avr')
+ if File.exist?(HERE + '/data.avr')
File.unlink(HERE + '/data.avr')
end
end
def test_differing_schemas_with_primitives
@@ -36,10 +36,10 @@
{ "type": "record",
"name": "User",
"fields" : [
{"name": "username", "type": "string"},
{"name": "age", "type": "int"},
- {"name": "verified", "type": "boolean", "default": "false"}
+ {"name": "verified", "type": "boolean", "default": false}
]}
JSON
data = [{"username" => "john", "age" => 25, "verified" => true},
{"username" => "ryan", "age" => 23, "verified" => false}]