Skip to content

Commit

Permalink
Change stubs to expects where appropriate
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 ab34ccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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,7 +58,7 @@
# 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
Expand Down

0 comments on commit ab34ccc

Please sign in to comment.