Module: Snapsync::SelfTest
- Defined in:
- lib/snapsync/test.rb
Overview
This module is the common setup for all tests
It should be included in the toplevel describe blocks
Instance Method Summary collapse
Instance Method Details
#make_tmpdir ⇒ Object
55 56 57 |
# File 'lib/snapsync/test.rb', line 55 def make_tmpdir @tempdirs << Dir.mktmpdir end |
#setup ⇒ Object
41 42 43 44 45 |
# File 'lib/snapsync/test.rb', line 41 def setup @tempdirs = Array.new super # Setup code for all the tests end |
#teardown ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/snapsync/test.rb', line 47 def teardown @tempdirs.each do |dir| FileUtils.rm_rf dir end super # Teardown code for all the tests end |