Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'stable' of github.com:Compass/compass-rails into stable

  • Loading branch information...
commit e41d782af9390a109ac7899e9391659b3e7db173 2 parents 6f6f010 + 5ea2c96
@craigmcnamara craigmcnamara authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 test/helpers/file_helper.rb
View
10 test/helpers/file_helper.rb
@@ -30,18 +30,18 @@ def touch(file)
debug("Touching File: #{file}".foreground(:green))
::FileUtils.touch(file)
end
-
- def inject_into_file(file_name, replacment, position, anchor)
+
+ def inject_into_file(file_name, replacement, position, anchor)
case position
when :after
- replace(file_name, Regexp.escape(anchor), "#{anchor}#{replacment}")
+ replace(file_name, Regexp.escape(anchor), "#{anchor}#{replacement}")
when :before
- replace(file_name, Regexp.escape(anchor), "#{replacment}#{anchor}")
+ replace(file_name, Regexp.escape(anchor), "#{replacement}#{anchor}")
else
raise Compass::FilesystemConflict.new("You need to specify :before or :after")
end
end
-
+
def replace(destination, regexp, string)
content = File.read(destination)
content.gsub!(Regexp.new(regexp), string)
Please sign in to comment.
Something went wrong with that request. Please try again.