Add some tests.

I cleaned the code. I add some test with beaker and rspec-puppet.