diff --git a/features/bundler-app/retest/retest_test/file_changes_test.rb b/features/bundler-app/retest/retest_test/file_changes_test.rb index b3f6074b..ea08577a 100644 --- a/features/bundler-app/retest/retest_test/file_changes_test.rb +++ b/features/bundler-app/retest/retest_test/file_changes_test.rb @@ -21,7 +21,7 @@ def test_modifying_existing_file modify_file('lib/bundler_app/bottles.rb') - assert_match "Test File Selected: test/bundler_app/test_bottles.rb", @output.read + assert_match "Test file: test/bundler_app/test_bottles.rb", @output.read assert_match "12 runs, 12 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -30,7 +30,7 @@ def test_modifying_existing_test_file modify_file('test/bundler_app/test_bottles.rb') - assert_match "Test File Selected: test/bundler_app/test_bottles.rb", @output.read + assert_match "Test file: test/bundler_app/test_bottles.rb", @output.read assert_match "12 runs, 12 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -39,7 +39,7 @@ def test_creating_a_new_test_file create_file 'test/bundler_app/test_foo.rb' - assert_match "Test File Selected: test/bundler_app/test_foo.rb", @output.read + assert_match "Test file: test/bundler_app/test_foo.rb", @output.read ensure delete_file 'test/bundler_app/test_foo.rb' @@ -54,13 +54,13 @@ def test_creating_a_new_file EXPECTED create_file 'test/bundler_app/test_foo.rb' - assert_match "Test File Selected: test/bundler_app/test_foo.rb", @output.read + assert_match "Test file: test/bundler_app/test_foo.rb", @output.read modify_file('lib/bundler_app/bottles.rb') - assert_match "Test File Selected: test/bundler_app/test_bottles.rb", @output.read + assert_match "Test file: test/bundler_app/test_bottles.rb", @output.read modify_file('lib/bundler_app/foo.rb') - assert_match "Test File Selected: test/bundler_app/test_foo.rb", @output.read + assert_match "Test file: test/bundler_app/test_foo.rb", @output.read ensure delete_file 'lib/bundler_app/foo.rb' @@ -74,7 +74,7 @@ def test_untracked_file launch_retest @command modify_file 'lib/bundler_app/foo.rb' - assert_match "Test File Selected: test/bundler_app/test_foo.rb", @output.read + assert_match "Test file: test/bundler_app/test_foo.rb", @output.read ensure delete_file 'lib/bundler_app/foo.rb' diff --git a/features/hanami-app/retest/retest_test.rb b/features/hanami-app/retest/retest_test.rb index 5f385522..6fbf3503 100644 --- a/features/hanami-app/retest/retest_test.rb +++ b/features/hanami-app/retest/retest_test.rb @@ -29,7 +29,7 @@ def test_modify_a_file modify_file 'apps/web/controllers/books/create.rb' - assert_match "Test File Selected: spec/web/controllers/books/create_spec.rb", @output.read + assert_match "Test file: spec/web/controllers/books/create_spec.rb", @output.read assert_match "4 runs, 7 assertions, 0 failures, 0 errors, 0 skips", @output.read end end diff --git a/features/rails-app/retest/retest_test.rb b/features/rails-app/retest/retest_test.rb index 8eb1b600..0542491e 100644 --- a/features/rails-app/retest/retest_test.rb +++ b/features/rails-app/retest/retest_test.rb @@ -29,7 +29,7 @@ def test_modify_a_file modify_file 'app/models/post.rb' - assert_match "Test File Selected: test/models/post_test.rb", @output.read + assert_match "Test file: test/models/post_test.rb", @output.read assert_match "1 runs, 1 assertions, 0 failures, 0 errors, 0 skips", @output.read end end diff --git a/features/rspec-rails/retest/retest_test.rb b/features/rspec-rails/retest/retest_test.rb index 11c19ba1..a8a796c2 100644 --- a/features/rspec-rails/retest/retest_test.rb +++ b/features/rspec-rails/retest/retest_test.rb @@ -29,7 +29,7 @@ def test_modify_a_file modify_file 'app/models/post.rb' - assert_match "Test File Selected: spec/models/post_spec.rb", @output.read + assert_match "Test file: spec/models/post_spec.rb", @output.read assert_match "2 examples, 0 failures", @output.read end end diff --git a/features/rspec-ruby/retest/retest_test/file_changes_test.rb b/features/rspec-ruby/retest/retest_test/file_changes_test.rb index ece241be..52668e80 100644 --- a/features/rspec-ruby/retest/retest_test/file_changes_test.rb +++ b/features/rspec-ruby/retest/retest_test/file_changes_test.rb @@ -21,7 +21,7 @@ def test_modifying_existing_file modify_file('lib/bottles.rb') - assert_match "Test File Selected: spec/bottles_spec.rb", @output.read + assert_match "Test file: spec/bottles_spec.rb", @output.read assert_match "12 examples, 0 failures", @output.read end @@ -30,7 +30,7 @@ def test_modifying_existing_test_file modify_file('spec/bottles_spec.rb') - assert_match "Test File Selected: spec/bottles_spec.rb", @output.read + assert_match "Test file: spec/bottles_spec.rb", @output.read assert_match "12 examples, 0 failures", @output.read end @@ -39,7 +39,7 @@ def test_creating_a_new_test_file create_file 'foo_spec.rb' - assert_match "Test File Selected: foo_spec.rb", @output.read + assert_match "Test file: foo_spec.rb", @output.read ensure delete_file 'foo_spec.rb' @@ -54,13 +54,13 @@ def test_creating_a_new_file EXPECTED create_file 'foo_spec.rb' - assert_match "Test File Selected: foo_spec.rb", @output.read + assert_match "Test file: foo_spec.rb", @output.read modify_file('lib/bottles.rb') - assert_match "Test File Selected: spec/bottles_spec.rb", @output.read + assert_match "Test file: spec/bottles_spec.rb", @output.read modify_file('foo.rb') - assert_match "Test File Selected: foo_spec.rb", @output.read + assert_match "Test file: foo_spec.rb", @output.read ensure delete_file 'foo.rb' @@ -74,7 +74,7 @@ def test_untracked_file launch_retest @command modify_file 'foo.rb' - assert_match "Test File Selected: foo_spec.rb", @output.read + assert_match "Test file: foo_spec.rb", @output.read ensure delete_file 'foo.rb' diff --git a/features/rspec-ruby/retest/retest_test/flags_test.rb b/features/rspec-ruby/retest/retest_test/flags_test.rb index c882ae16..66da617d 100644 --- a/features/rspec-ruby/retest/retest_test/flags_test.rb +++ b/features/rspec-ruby/retest/retest_test/flags_test.rb @@ -17,6 +17,6 @@ def test_with_no_command modify_file('lib/bottles.rb') - assert_match "Test File Selected: spec/bottles_spec.rb", @output.read + assert_match "Test file: spec/bottles_spec.rb", @output.read end end \ No newline at end of file diff --git a/features/ruby-app/retest/retest_test/file_changes_test.rb b/features/ruby-app/retest/retest_test/file_changes_test.rb index 2072c27d..83faa66d 100644 --- a/features/ruby-app/retest/retest_test/file_changes_test.rb +++ b/features/ruby-app/retest/retest_test/file_changes_test.rb @@ -21,7 +21,7 @@ def test_modifying_existing_file modify_file('lib/bottles.rb') - assert_match "Test File Selected: test/bottles_test.rb", @output.read + assert_match "Test file: test/bottles_test.rb", @output.read assert_match "12 runs, 12 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -30,7 +30,7 @@ def test_modifying_existing_test_file modify_file('test/bottles_test.rb') - assert_match "Test File Selected: test/bottles_test.rb", @output.read + assert_match "Test file: test/bottles_test.rb", @output.read assert_match "12 runs, 12 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -39,7 +39,7 @@ def test_creating_a_new_test_file create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo_test.rb' @@ -54,13 +54,13 @@ def test_creating_a_new_file EXPECTED create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read modify_file('lib/bottles.rb') - assert_match "Test File Selected: test/bottles_test.rb", @output.read + assert_match "Test file: test/bottles_test.rb", @output.read modify_file('foo.rb') - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo.rb' @@ -74,7 +74,7 @@ def test_untracked_file launch_retest @command modify_file 'foo.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo.rb' diff --git a/features/ruby-app/retest/retest_test/flags_test.rb b/features/ruby-app/retest/retest_test/flags_test.rb index 8fd86f64..25dd51c8 100644 --- a/features/ruby-app/retest/retest_test/flags_test.rb +++ b/features/ruby-app/retest/retest_test/flags_test.rb @@ -17,6 +17,6 @@ def test_with_no_command modify_file('lib/bottles.rb') - assert_match "Test File Selected: test/bottles_test.rb", @output.read + assert_match "Test file: test/bottles_test.rb", @output.read end end \ No newline at end of file diff --git a/features/ruby-app/retest/retest_test/matching_unmatching_command_test.rb b/features/ruby-app/retest/retest_test/matching_unmatching_command_test.rb index e9356174..0714afbd 100644 --- a/features/ruby-app/retest/retest_test/matching_unmatching_command_test.rb +++ b/features/ruby-app/retest/retest_test/matching_unmatching_command_test.rb @@ -21,7 +21,7 @@ def test_displaying_options_on_matching_command launch_retest('retest --ruby') create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read modify_file('lib/bottles.rb') assert_match <<~EXPECTED.chomp, @output.read @@ -39,7 +39,7 @@ def test_displaying_options_on_matching_command @input.write "2\n" wait - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo_test.rb' diff --git a/features/ruby-bare/retest/retest_test.rb b/features/ruby-bare/retest/retest_test.rb index ad30ea5b..a4612478 100644 --- a/features/ruby-bare/retest/retest_test.rb +++ b/features/ruby-bare/retest/retest_test.rb @@ -46,7 +46,7 @@ def test_modifying_existing_file modify_file('program.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read assert_match "1 runs, 1 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -55,7 +55,7 @@ def test_modifying_existing_test_file modify_file('program_test.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read assert_match "1 runs, 1 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -64,7 +64,7 @@ def test_creating_a_new_test_file create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read delete_file 'foo_test.rb' end @@ -78,13 +78,13 @@ def test_creating_a_new_file EXPECTED create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read modify_file('program.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read modify_file('foo.rb') - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read delete_file 'foo.rb' delete_file 'foo_test.rb' @@ -97,7 +97,7 @@ def test_untracked_file launch_retest @command modify_file 'foo.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read delete_file 'foo.rb' delete_file 'foo_test.rb' diff --git a/features/ruby-bare/retest/scenarios/auto_flag.rb b/features/ruby-bare/retest/scenarios/auto_flag.rb index 3cf701d7..31867189 100644 --- a/features/ruby-bare/retest/scenarios/auto_flag.rb +++ b/features/ruby-bare/retest/scenarios/auto_flag.rb @@ -14,6 +14,6 @@ def test_start_retest modify_file('program.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read end end \ No newline at end of file diff --git a/features/ruby-bare/retest/scenarios/changed_and_test_placeholders.rb b/features/ruby-bare/retest/scenarios/changed_and_test_placeholders.rb index 1f3172b9..0ab62ff6 100644 --- a/features/ruby-bare/retest/scenarios/changed_and_test_placeholders.rb +++ b/features/ruby-bare/retest/scenarios/changed_and_test_placeholders.rb @@ -18,9 +18,8 @@ def test_file_modification modify_file('program.rb') assert_match <<~EXPECTED, @output.read - Files Selected: - - changed: program.rb - - test: program_test.rb + Changed file: program.rb + Test file: program_test.rb placeholders: program.rb and program_test.rb EXPECTED diff --git a/features/ruby-bare/retest/scenarios/changed_placeholder.rb b/features/ruby-bare/retest/scenarios/changed_placeholder.rb index f681e3a8..5b23b2ba 100644 --- a/features/ruby-bare/retest/scenarios/changed_placeholder.rb +++ b/features/ruby-bare/retest/scenarios/changed_placeholder.rb @@ -18,7 +18,7 @@ def test_file_modification modify_file('program.rb') assert_match <<~EXPECTED, @output.read - Changed File Selected: program.rb + Changed file: program.rb file modified: program.rb EXPECTED end diff --git a/features/ruby-bare/retest/scenarios/force_polling.rb b/features/ruby-bare/retest/scenarios/force_polling.rb index f6fecd51..eb3dbfa4 100644 --- a/features/ruby-bare/retest/scenarios/force_polling.rb +++ b/features/ruby-bare/retest/scenarios/force_polling.rb @@ -21,7 +21,7 @@ def test_modifying_existing_file modify_file('program.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read assert_match "1 runs, 1 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -30,7 +30,7 @@ def test_modifying_existing_test_file modify_file('program_test.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read assert_match "1 runs, 1 assertions, 0 failures, 0 errors, 0 skips", @output.read end @@ -39,7 +39,7 @@ def test_creating_a_new_test_file create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo_test.rb' @@ -54,13 +54,13 @@ def test_creating_a_new_file EXPECTED create_file 'foo_test.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read modify_file('program.rb') - assert_match "Test File Selected: program_test.rb", @output.read + assert_match "Test file: program_test.rb", @output.read modify_file('foo.rb') - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo.rb' @@ -74,7 +74,7 @@ def test_untracked_file launch_retest @command modify_file 'foo.rb' - assert_match "Test File Selected: foo_test.rb", @output.read + assert_match "Test file: foo_test.rb", @output.read ensure delete_file 'foo.rb' diff --git a/features/ruby-bare/retest/scenarios/multiple_commands.rb b/features/ruby-bare/retest/scenarios/multiple_commands.rb index ad0eeec0..5f1d31b9 100644 --- a/features/ruby-bare/retest/scenarios/multiple_commands.rb +++ b/features/ruby-bare/retest/scenarios/multiple_commands.rb @@ -17,10 +17,13 @@ def test_file_modification modify_file('program.rb') + log("Changed file: #{changed_file}") + + log("Test file: #{cached_test_file}") + assert_match <<~EXPECTED, @output.read - Files Selected: - - changed: program.rb - - test: program_test.rb + Changed file: program.rb + Test file: program_test.rb files: program.rb and program_test.rb hello world diff --git a/lib/retest/runner.rb b/lib/retest/runner.rb index 85df6baf..292823a7 100644 --- a/lib/retest/runner.rb +++ b/lib/retest/runner.rb @@ -28,7 +28,7 @@ def run(changed_files: [], test_files: []) print_changed_file_not_found return end - log("Changed File Selected: #{changed_file}") + log("Changed file: #{changed_file}") end if command.to_s.include?('') @@ -36,7 +36,7 @@ def run(changed_files: [], test_files: []) print_test_file_not_found return end - log("Test File Selected: #{cached_test_file}") + log("Test file: #{cached_test_file}") end system_run command.to_s diff --git a/test/retest/runner_test.rb b/test/retest/runner_test.rb index 1eeb65c5..ca6cda23 100644 --- a/test/retest/runner_test.rb +++ b/test/retest/runner_test.rb @@ -68,8 +68,8 @@ def test_files_selected_ouptut _, _ = capture_subprocess_io { @subject.run(changed_files: ['file_path.rb'], test_files: ['file_path_test.rb']) } assert_equal(<<~EXPECTED, output) - Changed File Selected: file_path.rb - Test File Selected: file_path_test.rb + Changed file: file_path.rb + Test file: file_path_test.rb EXPECTED end @@ -77,7 +77,7 @@ def test_run_with_no_match _, _ = capture_subprocess_io { @subject.run(changed_files: ['another_file_path.rb'], test_files: [nil]) } assert_equal(<<~EXPECTED, output) - Changed File Selected: another_file_path.rb + Changed file: another_file_path.rb FileNotFound - Retest could not find a matching test file to run. EXPECTED end