Skip to content

Commit

Permalink
Change stubs to expects
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
  • Loading branch information
jerryaldrichiii committed Nov 30, 2017
1 parent d494df2 commit f3594f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/windows/local_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
connection = conn

# Verify pipe is created by using PowerShell to check pipe location
SecureRandom.stubwass(:hex).returns('with_pipe')
SecureRandom.expects(:hex).returns('with_pipe')
cmd = connection.run_command('Get-ChildItem //./pipe/ | Where-Object { $_.Name -Match "inspec_with_pipe" }')
cmd.stdout.wont_be_nil
cmd.stderr.must_equal ''
Expand All @@ -58,11 +58,11 @@
# Prevent named pipe from being created
Train::Transports::Local::Connection::WindowsPipeRunner
.any_instance
.stubs(:acquire_pipe)
.expects(:acquire_pipe)
.returns(nil)

# Verify pipe was not created by using PowerShell to check pipe location
SecureRandom.stubs(:hex).returns('minitest')
SecureRandom.expects(:hex).returns('minitest')
cmd = connection.run_command('Get-ChildItem //./pipe/ | Where-Object { $_.Name -Match "inspec_minitest" }')
cmd.stdout.must_equal ''
cmd.stderr.must_equal ''
Expand Down

0 comments on commit f3594f5

Please sign in to comment.