From 5ac0f846f60d16f2ee38b6a0e5c5f206405c1bfd Mon Sep 17 00:00:00 2001 From: MIKAMI Yoshiyuki Date: Mon, 29 Nov 2010 10:57:56 +0900 Subject: [PATCH] Changed --autotest to --tty. - Closes #235. --- lib/autotest/rspec2.rb | 2 +- spec/autotest/rspec_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/autotest/rspec2.rb b/lib/autotest/rspec2.rb index 8c8728d1b5..c61772ac63 100644 --- a/lib/autotest/rspec2.rb +++ b/lib/autotest/rspec2.rb @@ -41,7 +41,7 @@ def consolidate_failures(failed) def make_test_cmd(files_to_test) files_to_test.empty? ? '' : - "#{bundle_exec}#{ruby} #{require_rubygems}-S #{SPEC_PROGRAM} --autotest #{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}" + "#{bundle_exec}#{ruby} #{require_rubygems}-S #{SPEC_PROGRAM} --tty #{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}" end def bundle_exec diff --git a/spec/autotest/rspec_spec.rb b/spec/autotest/rspec_spec.rb index 5d542453d8..f71e16f992 100644 --- a/spec/autotest/rspec_spec.rb +++ b/spec/autotest/rspec_spec.rb @@ -39,6 +39,12 @@ cmd.should match(/'#{File.expand_path(file_to_test)}'/) end end + + it "gives '--tty' to #{Autotest::Rspec2::SPEC_PROGRAM}, not '--autotest'" do + cmd = rspec_autotest.make_test_cmd(@files_to_test) + cmd.should match(' --tty ') + cmd.should_not match(' --autotest ') + end end describe "mappings" do