Skip to content

Instantly share code, notes, and snippets.

@jbodah
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbodah/6041a9b60f698333c7e1 to your computer and use it in GitHub Desktop.
Save jbodah/6041a9b60f698333c7e1 to your computer and use it in GitHub Desktop.
One-liner to get a diff between two strings and write it to a file
require 'diffy'; File.open(Rails.root.join('diff'), 'w') {|f| f.write Diffy::Diff.new event_json, expected_json}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment