diff options
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/cask/container/dmg_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/test/cask/container/dmg_spec.rb b/Library/Homebrew/test/cask/container/dmg_spec.rb index a94362aba..4f3f57071 100644 --- a/Library/Homebrew/test/cask/container/dmg_spec.rb +++ b/Library/Homebrew/test/cask/container/dmg_spec.rb @@ -9,11 +9,12 @@ describe Hbc::Container::Dmg, :cask do Hbc::SystemCommand, ) - begin - dmg.mount! - expect(dmg.mounts).not_to include nil - ensure - dmg.eject! + dmg.mount do |mounts| + begin + expect(mounts).not_to include nil + ensure + mounts.each(&dmg.public_method(:eject)) + end end end end |
