lib/snapshot/runner.rb in snapshot-0.4.7 vs lib/snapshot/runner.rb in snapshot-0.4.8
- old
+ new
@@ -32,10 +32,12 @@
SnapshotConfig.shared_instance.blocks[:teardown_language].call(language, device) # Callback
end
SnapshotConfig.shared_instance.blocks[:teardown_device].call(device) # Callback
end
+ `killall "iOS Simulator"` # close the simulator after the script is finished
+
ReportsGenerator.new.generate
if errors.count > 0
Helper.log.error "-----------------------------------------------------------"
Helper.log.error errors.join(' - ').red
@@ -159,10 +161,10 @@
raise "Looks like something is wrong with the used app. Make sure the build was successful."
end
end
def copy_screenshots(language)
- resulting_path = [SnapshotConfig.shared_instance.screenshots_path, language].join('/')
+ resulting_path = File.join(SnapshotConfig.shared_instance.screenshots_path, language)
FileUtils.mkdir_p resulting_path
unless SnapshotConfig.shared_instance.skip_alpha_removal
ScreenshotFlatten.new.run(TRACE_DIR)