Add specs for passing an Encoding object as the :encoding option
Add support for passing an Encoding object as the :encoding option