Use inspect instead of to_s for 1.8 compatibility:
http://stackoverflow.com/questions/12678218/difference-in-arrayto-s-in-ruby-1-8-and-ruby-1-9
Don't test exact hash value since to_json hash ordering varies between
1.8.7 and 1.9+
Use inspect to handle Ruby 1.8.7 variation