Skip to content

Commit

Permalink
Changed --autotest to --tty.
Browse files Browse the repository at this point in the history
- Closes rspec#235.
  • Loading branch information
yoshuki authored and dchelimsky committed Nov 29, 2010
1 parent 4cb4c22 commit 5ac0f84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/autotest/rspec2.rb
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions spec/autotest/rspec_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5ac0f84

Please sign in to comment.