refactor test and change Rakefile config