fix rails 4.2 check and starting to work on tests