Permalink
Browse files

Merge pull request #570 from tomstuart/rspec-executable-spaces

Autotest fails if RSpec executable path contains spaces
  • Loading branch information...
2 parents 5686c13 + b804c70 commit 49ea20ba1349421408ef2ff0d8aea8693e2764d4 @dchelimsky dchelimsky committed Feb 4, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/autotest/rspec2.rb
  2. +1 −1 spec/autotest/rspec_spec.rb
View
2 lib/autotest/rspec2.rb
@@ -47,7 +47,7 @@ def consolidate_failures(failed)
# Overrides Autotest's implementation to generate the rspec command to run
def make_test_cmd(files_to_test)
files_to_test.empty? ? '' :
- "#{prefix}#{ruby}#{suffix} -S #{RSPEC_EXECUTABLE} --tty #{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}"
+ "#{prefix}#{ruby}#{suffix} -S '#{RSPEC_EXECUTABLE}' --tty #{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}"
end
# Generates a map of filenames to Arrays for Autotest
View
2 spec/autotest/rspec_spec.rb
@@ -30,7 +30,7 @@
it "makes the appropriate test command" do
actual_command = rspec_autotest.make_test_cmd(@files_to_test)
- expected_command = /#{ruby_cmd}.*#{spec_cmd} (.*)/
+ expected_command = /#{ruby_cmd}.*'#{spec_cmd}' (.*)/
actual_command.should match(expected_command)

0 comments on commit 49ea20b

Please sign in to comment.