Fixes to Rspec tests