validate_encode -> validate_encoding
use rspec 3.0