Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- CHEFSPEC



  Stub Mixlib::ShellOut and shell_out in Ruby unit testing

Unit testing is part of software development to ensure the tiny component of a function can work as designed. Different frameworks and tools can be used to run unit testing for different programming languages. In Ruby, one popular unit testing framework is Rspec, or Chefspec if you are writing Chef recipes. While writing Chef recipes, some low level commands(DOS commands or shell commands) need to be executed on the managed resource to perform actions or gather information. For example, lis...

   RUBY,UNIT TESTING,RSPEC,CHEFSPEC,SHELL_OUT     2016-11-11 00:14:46