At GoGaRuco (Golden Gate RubyConf) in San Francisco, CA today…
Talk by Aaron Patterson
refute_equal (same as assert_not in TestUnit)
inherit from MiniTest::Unit::TestCase
Run test with -verbose, you can see how long each test takes.
minitest/spec (similar to rspec)
ObjectSpace.each_object do |obj|
count_object_size (to see how much memory a particular object is taking in total
memsize_of (returns size in bytes)
count_tdata_objects (counts native objects)
A libffi wrapper that’s in Ruby 1.9
Fiddle allows your Ruby code to call native functions (Dynamic Libraries) and allocate closures.
Psych (YAML Parser)
JSON is a subset of YAML. So Psych will load JSON.
Psych supports Evented Parsing (similar to SAX XML Parsers which call events when certain xml elements are seen)
Event Emitting (emit YAML)
Streamed Emitting (an easy way for Evented Emitting. It emits immediately. There’s no buffering)
Each calls to push method emits multiple documents.
Streaming JSON Emitter (Psych::JSON::Stream)
How to Figure Out Code Coverage in Ruby 1.9
Leave a Reply