use rspec instead of check method