Skip to content

Commit 7e9e0ef

Browse files
committed
Remove .puts (for now)
1 parent 21d1a3d commit 7e9e0ef

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

exe/retest

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'retest'
55
$stdout.sync = true
66
listen_rd, listen_wr = IO.pipe
77
Signal.trap(:INT) do
8-
$stdout.puts "Goodbye"
8+
puts "Goodbye"
99
listen_rd.close
1010
listen_wr.close
1111
exit
@@ -14,12 +14,12 @@ end
1414
options = Retest::Options.new(ARGV)
1515

1616
if options.help?
17-
$stdout.puts options.help
17+
puts options.help
1818
return
1919
end
2020

2121
if options.version?
22-
$stdout.puts Retest::VERSION
22+
puts Retest::VERSION
2323
return
2424
end
2525

@@ -57,18 +57,18 @@ end
5757

5858
# Main action
5959

60-
$stdout.puts launching_message
60+
puts launching_message
6161
Retest.listen(options, listener: watcher) do |modified, added, removed|
6262
begin
6363
repository.sync(added: added, removed: removed)
6464
runner.sync(added: added, removed: removed)
6565

6666
listen_wr.puts "file changed: #{(modified + added).first}"
6767
rescue => e
68-
$stdout.puts "Something went wrong: #{e.message}"
68+
puts "Something went wrong: #{e.message}"
6969
end
7070
end
71-
$stdout.puts "Ready to refactor! You can make file changes now"
71+
puts "Ready to refactor! You can make file changes now"
7272

7373
def run_command(input:, program:)
7474
program.clear_terminal

features/rails-app/retest/retest_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def test_with_no_command_all
8181

8282
assert_match <<~OUTPUT, @output.read
8383
Setup identified: [RAILS]. Using command: 'bin/rails test'
84+
Watcher: [LISTEN]
8485
Launching Retest...
8586
Ready to refactor! You can make file changes now
8687
OUTPUT

features/rspec-ruby/retest/retest_test/flags_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def test_with_no_command
1111

1212
assert_match <<~OUTPUT, @output.read
1313
Setup identified: [RSPEC]. Using command: 'bundle exec rspec <test>'
14+
Watcher: [LISTEN]
1415
Launching Retest...
1516
Ready to refactor! You can make file changes now
1617
OUTPUT

features/ruby-app/retest/retest_test/flags_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def test_with_no_command
1111

1212
assert_match <<~OUTPUT, @output.read
1313
Setup identified: [RUBY]. Using command: 'bundle exec ruby <test>'
14+
Watcher: [LISTEN]
1415
Launching Retest...
1516
Ready to refactor! You can make file changes now
1617
OUTPUT

features/ruby-bare/retest/scenarios/auto_flag.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def test_start_retest
88

99
assert_match <<~OUTPUT, @output.read
1010
Setup identified: [RUBY]. Using command: 'ruby <test>'
11+
Watcher: [LISTEN]
1112
Launching Retest...
1213
Ready to refactor! You can make file changes now
1314
OUTPUT

features/watchexec-ruby-app/retest/retest_test/file_changes_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def test_start_retest
88
launch_retest(COMMAND)
99

1010
assert_match <<~EXPECTED, @output.read
11-
Watcher: [WATCHEXEC]
1211
Setup identified: [RUBY]. Using command: 'bundle exec ruby <test>'
12+
Watcher: [WATCHEXEC]
1313
Launching Retest...
1414
Ready to refactor! You can make file changes now
1515
EXPECTED

0 commit comments

Comments
 (0)