diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-03-22 14:24:36 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-03-22 14:43:49 +0000 |
commit | c91789c76b8cd403c299e28c98a6b046cc4f0af1 (patch) | |
tree | 044d4563e1fa71313e81295ea8cc6cffcc810e67 /railties/test | |
parent | d8d6dada77d7d30526b0f8d11928ec94e9f79db9 (diff) | |
download | rails-c91789c76b8cd403c299e28c98a6b046cc4f0af1.tar.gz rails-c91789c76b8cd403c299e28c98a6b046cc4f0af1.tar.bz2 rails-c91789c76b8cd403c299e28c98a6b046cc4f0af1.zip |
Don't kill the console
Use the "quit" command instead. This seems to prevents some weirdness on
OS X. See #9761.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/console_test.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb index d586822501..80700a1d64 100644 --- a/railties/test/application/console_test.rb +++ b/railties/test/application/console_test.rb @@ -126,12 +126,6 @@ class FullStackConsoleTest < ActiveSupport::TestCase assert_output "> " end - def kill(pid) - Process.kill('TERM', pid) - Process.wait(pid) - rescue Errno::ESRCH - end - def spawn_console pid = Process.spawn( "#{app_path}/bin/rails console --sandbox", @@ -148,15 +142,13 @@ class FullStackConsoleTest < ActiveSupport::TestCase write_prompt "Post.count", "=> 0" write_prompt "Post.create" write_prompt "Post.count", "=> 1" - - kill pid + @master.puts "quit" pid = spawn_console write_prompt "Post.count", "=> 0" write_prompt "Post.transaction { Post.create; raise }" write_prompt "Post.count", "=> 0" - ensure - kill pid if pid + @master.puts "quit" end end |