colszowka/simplecov — Issue #93: JSON dump/no coverage after running tests in Snow Leopard
Author: uberllama
Created: 2011-11-10 00:20:13+00:00
State: open

My unfortunate disclaimer is that I can't pinpoint when exactly this happened. But whenever I run one or more tests now, I get a MultiJson:DecodeError exception with a giant stack trace. It points to a few classes in my lib directory, which I've tried clearing out and deleting altogether to no avail. A couple other devs working in the same branch with the exact same config (Ruby 1.92 via RVM, Rails 3.04) but running Lion are not having this issue. They get proper coverage report generation.

My test_helper starts like this:

require 'simplecov'
SimpleCov.start 'rails' do
add_filter 'vendor'
end

Stack trace starts with this:

/Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/json-1.5.3/lib/json/common.rb:148:in `parse': 745: unexpected token at 'null (MultiJson::DecodeError)

...and ends with this:

from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/json-1.5.3/lib/json/common.rb:148:in `parse'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/multi_json-1.0.3/lib/multi_json/engines/json_gem.rb:13:in `decode'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/multi_json-1.0.3/lib/multi_json.rb:65:in `decode'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov/result_merger.rb:18:in `resultset'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov/result_merger.rb:67:in `store_result'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov.rb:48:in `result'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov/configuration.rb:133:in `block in at_exit'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov/defaults.rb:47:in `call'
from /Users/yuval/.rvm/gems/ruby-1.9.2-p180/gems/simplecov-0.5.4/lib/simplecov/defaults.rb:47:in `block in '