diff --git a/lib/failing_spec_detector/failing_spec_formatter.rb b/lib/failing_spec_detector/failing_spec_formatter.rb index 4214bcd..2c48c15 100644 --- a/lib/failing_spec_detector/failing_spec_formatter.rb +++ b/lib/failing_spec_detector/failing_spec_formatter.rb @@ -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) diff --git a/lib/tasks/failing_spec_detector/print_log.rake b/lib/tasks/failing_spec_detector/print_log.rake index a7cd8b3..9cb61d8 100644 --- a/lib/tasks/failing_spec_detector/print_log.rake +++ b/lib/tasks/failing_spec_detector/print_log.rake @@ -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) diff --git a/spec/failing_spec_detector/failing_spec_formatter_spec.rb b/spec/failing_spec_detector/failing_spec_formatter_spec.rb index 566bae8..53f967f 100644 --- a/spec/failing_spec_detector/failing_spec_formatter_spec.rb +++ b/spec/failing_spec_detector/failing_spec_formatter_spec.rb @@ -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') }