sinatra/sinatra-contrib — pull request #57 by aishafenton (2012-07-08 02:15:59+00:00)
Title: StdLib JSON library not being found.

Currently the StdLib JSON library doesn't get set as the default encoder. This fixes it.

Tried to write a test case around this and the other default encoders, but it's a really hard one to test for. Problem is that the default encoder logic is based on what gems (modules) are required in the global namespace.

How do you un-require a gem once required in your test case? I don't think it's possible without some serious hacking that would create a big mess. Any ideas?