Skip to content

Commit

Permalink
use around
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Apr 19, 2016
1 parent c66eaa1 commit 1c382d6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions spec/return_codes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
# See https://github.com/colszowka/simplecov/issues/5
describe "return codes" do
context "inside fixtures/frameworks" do
before do
@current_dir = Dir.getwd
Dir.chdir(File.join(File.dirname(__FILE__), "fixtures", "frameworks"))
FileUtils.rm_rf("./coverage")
end

after do
Dir.chdir(@current_dir)
around do |test|
Dir.chdir(File.join(File.dirname(__FILE__), "fixtures", "frameworks")) do
FileUtils.rm_rf("./coverage")
test.call
end
end

it "has return code 0 when running testunit_good.rb" do
Expand Down

0 comments on commit 1c382d6

Please sign in to comment.