mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
test: read mock-archives in binary mode
this doesn't hurt in *nix, but makes tests pass on windows.
This commit is contained in:
parent
c891686d72
commit
2da97df5f0
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ describe Fetchers::Url do
|
|||
let(:res) {
|
||||
mock_open = Minitest::Mock.new
|
||||
mock_open.expect :meta, {'content-type' => 'application/gzip'}
|
||||
mock_open.expect :read, File.read(mock_file)
|
||||
mock_open.expect :read, File.open(mock_file, 'rb').read
|
||||
fetcher.expects(:open).returns(mock_open)
|
||||
fetcher.resolve(target)
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ describe Fetchers::Url do
|
|||
let(:res) {
|
||||
mock_open = Minitest::Mock.new
|
||||
mock_open.expect :meta, {'content-type' => 'application/zip'}
|
||||
mock_open.expect :read, File.read(mock_file)
|
||||
mock_open.expect :read, File.open(mock_file, 'rb').read
|
||||
fetcher.expects(:open).returns(mock_open)
|
||||
fetcher.resolve(target)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue