refactored test cases
required ruby version >= 1.9