fix coding issue of rspec test cases