module Snapsync::SelfTest
This module is the common setup for all tests
It should be included in the toplevel describe blocks
@example
require 'snapsync/test' describe Snapsync do include Snapsync::SelfTest end
Public Instance Methods
make_tmpdir()
click to toggle source
# File lib/snapsync/test.rb, line 55 def make_tmpdir @tempdirs << Dir.mktmpdir end
setup()
click to toggle source
Calls superclass method
# File lib/snapsync/test.rb, line 41 def setup @tempdirs = Array.new super # Setup code for all the tests end
teardown()
click to toggle source
Calls superclass method
# 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