implemented rspec and vote test cases