title: matching exact string with Serverspec (rspec)
body: <p>I would like to come up with a test which would fail, unless the string matches exactly. </p>
  
  <p>Output which should lead to a failure</p>
  
  <pre><code>PS C:\Users\vagrant&gt; auditpol.exe /get /subcategory:'User Account Management'
  System audit policy
  Category/Subcategory                      Setting
  Account Management
    User Account Management                 Success and Failure
  </code></pre>
  
  <p>Output which should lead to success:</p>
  
  <pre><code>PS C:\Users\vagrant&gt; auditpol.exe /get /subcategory:'User Account Management'
  System audit policy
  Category/Subcategory                      Setting
  Account Management
    User Account Management                 Success
  </code></pre>
  
  <p>And various permutations of below test which passes despite hours of googling and experimenting</p>
  
  <pre><code>describe command("auditpol.exe /get /subcategory:'User Account Management'") do 
    its(:stdout){should match(/User Account Management                 Success/)}
  end
  </code></pre>
  
  <p>The most promising test is this, however it wants the exact literal match of entire output, not just the string in question:</p>
  
  <pre><code>describe command("auditpol.exe /get /subcategory:'User Account Management'") do 
    its(:stdout){should eq(/User Account Management                 Success/)}
  end
  </code></pre>
  
  <p>Thanks</p>