Skip to content
Snippets Groups Projects
Commit 83c1b399 authored by Markus Reiter's avatar Markus Reiter
Browse files

Use `around` hook for shared "integration test" context.

parent 0dfe85df
No related branches found
No related tags found
No related merge requests found
......@@ -38,14 +38,16 @@ RSpec.shared_context "integration test" do
end
end
before(:each) do
(HOMEBREW_PREFIX/"bin").mkpath
FileUtils.touch HOMEBREW_PREFIX/"bin/brew"
end
after(:each) do
FileUtils.rm HOMEBREW_PREFIX/"bin/brew"
FileUtils.rmdir HOMEBREW_PREFIX/"bin"
around(:each) do |example|
begin
(HOMEBREW_PREFIX/"bin").mkpath
FileUtils.touch HOMEBREW_PREFIX/"bin/brew"
example.run
ensure
FileUtils.rm HOMEBREW_PREFIX/"bin/brew"
FileUtils.rmdir HOMEBREW_PREFIX/"bin"
end
end
# Generate unique ID to be able to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment