Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
safafa committed Jan 2, 2024
1 parent 84dd153 commit bd01391
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/failing_spec_detector/failing_spec_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def initialize(output)
super(output)
@failures = []
@exceptions = []
@failures_filename = "failures_log_#{ENV.fetch('TEST_ENV_NUMBER', nil)}.yml"
@exceptions_filename = "exceptions_log_#{ENV.fetch('TEST_ENV_NUMBER', nil)}.yml"
@failures_filename = "spec/failing_spec_detector/failures_log_#{ENV.fetch('TEST_ENV_NUMBER', nil)}.yml"
@exceptions_filename = "spec/failing_spec_detector/exceptions_log_#{ENV.fetch('TEST_ENV_NUMBER', nil)}.yml"
end

def example_failed(failure)
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/failing_spec_detector/print_log.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace :failing_specs_detector do
task :print_log do
failures = []
exceptions = []
failures_file_paths = Dir['failures_log_*.yml']
exceptions_file_paths = Dir['exceptions_log_*.yml']
failures_file_paths = Dir['spec/failing_spec_detector/failures_log_*.yml']
exceptions_file_paths = Dir['spec/failing_spec_detector/exceptions_log_*.yml']
failures_file_paths.each do |file_path|
failures.concat(YAML.load_file(file_path, permitted_classes: [FailingSpecDetector::Failure]))
File.delete(file_path)
Expand Down
4 changes: 2 additions & 2 deletions spec/failing_spec_detector/failing_spec_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
let(:output) { Tempfile.new('./output_to_close') }
let(:expected_failures_file_path) { './spec/support/expected_failures_log_.yml' }
let(:expected_exceptions_file_path) { './spec/support/expected_exceptions_log_.yml' }
let(:actual_failures_file_path) { './failures_log_.yml' }
let(:actual_exceptions_file_path) { './exceptions_log_.yml' }
let(:actual_failures_file_path) { './spec/failing_spec_detector/failures_log_.yml' }
let(:actual_exceptions_file_path) { './spec/failing_spec_detector/exceptions_log_.yml' }
let(:expected_failures_file) { File.new(expected_failures_file_path, 'r') }
let(:expected_exceptions_file) { File.new(expected_exceptions_file_path, 'r') }
let(:actual_failures_file) { File.new(actual_failures_file_path, 'r') }
Expand Down

0 comments on commit bd01391

Please sign in to comment.