Class: MinitestSpecConverter::MassConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest_spec_converter/mass_converter.rb

Instance Method Summary collapse

Constructor Details

#initialize(test_dir) ⇒ MassConverter

Returns a new instance of MassConverter.



9
10
11
12
13
14
15
16
# File 'lib/minitest_spec_converter/mass_converter.rb', line 9

def initialize(test_dir)
  # check that dirrectory exists
  unless Dir.exist?(test_dir)
    puts "Directory must exist: #{test_dir}"
    exit
  end
  @test_dir = test_dir
end

Instance Method Details

#convertObject



18
19
20
21
22
23
24
25
# File 'lib/minitest_spec_converter/mass_converter.rb', line 18

def convert
  setup
  get_all_files.each do |file|
    puts "Converting: #{file}"
    Converter.new(file).convert
  end
  cleanup
end