rewrote tests in rspec