Permalink
Browse files

Merge remote-tracking branch 'joshcooper/maint/master/regexp-escape-c…

…ommand'

* joshcooper/maint/master/regexp-escape-command:
  Maint: Escape command in regexp
  • Loading branch information...
2 parents 88911e0 + aabbf9e commit a202826ae1de4d6824e39000b014175142beb2e6 @jeffweiss jeffweiss committed Apr 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/unit/provider_spec.rb
View
4 spec/unit/provider_spec.rb
@@ -346,10 +346,10 @@
parent.commands :sh => command
FileTest.should be_exists parent.command(:sh)
- parent.command(:sh).should =~ /#{command}$/
+ parent.command(:sh).should =~ /#{Regexp.escape(command)}$/
FileTest.should be_exists child.command(:sh)
- child.command(:sh).should =~ /#{command}$/
+ child.command(:sh).should =~ /#{Regexp.escape(command)}$/
end
it "#1197: should find commands added in the same run" do

0 comments on commit a202826

Please sign in to comment.