Separate tests for dummy and normal encodings, without using exceptions

Will it work in other ruby versions?