improved test for rspec