Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DO NOT MERGE) (MODULES-3391) Run all unit tests with rake test, address test failure #32

Commits on Jul 26, 2016

  1. (MODULES-3391) Extend rspec test pattern to all tests

    This commit extends the existing rspec test matcher to encompass all tests
    under the spec directory - or, more specifically, the exact matcher that
    rspec's built-in Rake::Task supplies. This means it actually includes more
    directories than strictly exist under spec, but this perhaps is a bit of future
    proofing in case we ultimately add more subdirectories, e.g., 'defines'.
    
    Signed-off-by: Moses Mendoza <mendoza.moses@gmail.com>
    MosesMendoza committed Jul 26, 2016
    Configuration menu
    Copy the full SHA
    361eba0 View commit details
    Browse the repository at this point in the history
  2. (MODULES-3391) Fix failure in config_spec.rb

    Prior to this commit a test in the config_spec was failing with:
    
    Mocha::ExpectationError:
    unexpected invocation: #<AnyInstance:Win32::Registry>.[]('Domain')
    satisfied expectations:
    - allowed any number of times, invoked 4 times:
      #<AnyInstance:Win32::Registry>.[]('ChocolateyInstall')
    - allowed any number of times, not yet invoked:
      #<Puppet::Util::Feature:0x45b5be0>.root?(any_parameters)
    
    This is because a facter fact was making a call to Win32::Registry.[] which
    hadn't been stubbed (two, in fact). This commit adds these stubs to the
    spec_helper in addition to the existing one. This commit makes test pass, but
    may be more brittle than a more generic stub that doesn't specify the
    parameter. This commit assumes the specificity is of higher value.
    
    Signed-off-by: Moses Mendoza <mendoza.moses@gmail.com>
    MosesMendoza committed Jul 26, 2016
    Configuration menu
    Copy the full SHA
    5fdf034 View commit details
    Browse the repository at this point in the history