Improve tests to make them work with rspec 3.1