Fix tests for Rails 4

* require `protected_attributes` gem for Rails 4
* fix `Comparable` implementation
* silence warnings