Add appraisal for Rails 4.0
Update tests for Rails 4.0