Yannick -- > > And it shouldn't be too hard to have some tests for this. > Well, I can try this. As far as I can see I should look to RSpec, right? > At this time I do not have imported git or so, just patched my installed > sources. But how can I test such feature? I mean, how to check that the > client will only print at the given loglevel?
The key to writing a good test is picking what to test. In this case, the change only affects how Puppet::Util::Log.level is set, not how it is used, so that's the new behavior that needs new tests. If you confirm things like: * Log.level defaults to :info with no command line arguments * Log.level is set to the --loglevel argument if it is a valid log level * A warning is generated if an invalid --loglevel argument is specified * Log.level stays :info invalid --loglevel argument is specified * Log.level is set to :debug if the :debug flag is given * --loglevel is ignored (does not change Log.level, does not generate warnings) and Log.level is set to :debug if the :debug flag is given > Thanks for the help. And thank you for the patch. -- Markus -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
