FIX: upgrade to rails 4 and rspec 3

- upgrade gem dependencies
- fix rspec deprecations
- fix spec constants
- CCD-19918, CCD-20008