added rspec tests and conform to puppet style guide