spec/yielding_spec.rb in yaml-write-stream-2.0.0 vs spec/yielding_spec.rb in yaml-write-stream-2.0.1
- old
+ new
@@ -69,7 +69,16 @@
end
stream_writer.close
expect(stream.string).to eq("foo: \n")
end
+
+ it 'quotes numeric string keys' do
+ stream_writer.write_map do |map_writer|
+ map_writer.write_key_value('110', 'foo')
+ end
+
+ stream_writer.close
+ expect(stream.string).to eq(utf8("\"110\": \"foo\"\n"))
+ end
end
end