Fixed failing specs after upgrade to Rails 4 (fixes: #1, fixes: #2)