Fix test that fails on 1.9 due to behaviour of String#start_with?
On ruby 1.9, the argument of String#start_with? does not automatically get coerced into a string. In Homesick#clone, we use start_with? with a Pathname instance, which now always returns false.
This commit is contained in:
@@ -22,7 +22,7 @@ class Homesick < Thor
|
|||||||
destination = nil
|
destination = nil
|
||||||
if File.exist?(uri)
|
if File.exist?(uri)
|
||||||
uri = Pathname.new(uri).expand_path
|
uri = Pathname.new(uri).expand_path
|
||||||
if uri.to_s.start_with?(repos_dir)
|
if uri.to_s.start_with?(repos_dir.to_s)
|
||||||
raise "Castle already cloned to #{uri}"
|
raise "Castle already cloned to #{uri}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user