Skip to content

Instantly share code, notes, and snippets.

@takahi-i
Last active August 29, 2015 14:13
Show Gist options
  • Save takahi-i/fece21865e4a189e22f6 to your computer and use it in GitHub Desktop.
Save takahi-i/fece21865e4a189e22f6 to your computer and use it in GitHub Desktop.
test do
system "#{bin}/redpen", "-version"
file_name = "sampledoc-en.txt"
path = "#{libexec}/sample-doc/en/#{file_name}"
output = `#{bin}/redpen -c #{libexec}/conf/redpen-conf-en.xml #{path}`
errors = output.split("\n").select { |line| line.start_with?(file_name) }
assert errors.find{|e|(e.start_with?("#{file_name}:1: ValidationError[SymbolWithSpace]"))}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment