move_same_direction method added and tests.rb file created