spec/resources/fixtures.rb in moblues-0.1.0 vs spec/resources/fixtures.rb in moblues-0.2.0

- old
+ new

@@ -3,32 +3,32 @@ def xcdatamodeld 'spec/resources/Model.xcdatamodeld' end - def expected_dir - 'spec/resources/expected' + def expected_dir(language) + "spec/resources/expected/#{language}" end - def generated_dir - 'spec/resources/tmp' + def generated_dir(language) + "spec/resources/tmp/#{language}" end - def generated_file_content(name) - read_file(generated_dir, name) + def generated_file_content(name, language) + read_file(generated_dir(language), name) end - def expected_content(name) - read_file(expected_dir, name) + def expected_content(name, language) + read_file(expected_dir(language), name) end def read_file(directory, file) File.read(File.join(directory, file)) end - def delete_tmp_files(files) + def delete_tmp_files(files, language) files.each { |file| - path = File.join(generated_dir, file) + path = File.join(generated_dir(language), file) File.delete(path) if File.exists?(path) } end end