fix tests for mocking in rspec