Permalink
Browse files

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

  • Loading branch information...
2 parents 6f6f010 + 5ea2c96 commit e41d782af9390a109ac7899e9391659b3e7db173 @craigmcnamara craigmcnamara committed Dec 6, 2013
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)

0 comments on commit e41d782

Please sign in to comment.