Skip to content

Commit 063c807

Browse files
committed
Added code to remove tmp dir after test suite is completed, fixes bug #79
1 parent 137882f commit 063c807

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/haml-rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Railtie < ::Rails::Railtie
5454

5555
rake_tasks do
5656
load 'tasks/erb2haml.rake'
57-
end
57+
end
5858
end
5959
end
6060
end

test/test_helper.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,10 @@ def require_generators(generator_list)
7070
end
7171
alias :require_generator :require_generators
7272

73-
require_generators generator_list
73+
require_generators generator_list
74+
75+
# Remove tmp directory when test suite is completed
76+
MiniTest::Unit.after_tests do
77+
tmp_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp'))
78+
FileUtils.rm_r(tmp_dir)
79+
end

0 commit comments

Comments
 (0)