lib/reportir.rb in reportir-0.3.4 vs lib/reportir.rb in reportir-0.3.5

- old
+ new

@@ -3,11 +3,11 @@ require 'aws-sdk' #TODO: RSpec::Core::Formatters.register module Reportir - @@step = 0 + @@step = 0 #TODO: Dont use class variables! Use class instance vars @@tests = [] # has to be array for front-end def upload_result_to_s3_as_static_site return upload_everything_to_s3 if upload_to_s3_possible? save_report_locally @@ -91,9 +91,10 @@ def write_javascript_models string = %{ var navigation = #{array_of_test_names.to_json}; var tests = #{@@tests.to_json}; } + FileUtils.mkdir_p("#{local_root}/js") File.open(local_model_file_path, "w") { |f| f.write(string) } end def clear_previous_results_from_s3 puts "deleting all previous test data from s3"