fix unit test, add rakefile