Created
March 10, 2011 06:20
-
-
Save Sutto/863653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def diff(a, b, file = "current.diff") | |
require 'rspec/expectations/differ' | |
differ = RSpec::Expectations::Differ.new | |
diff = differ.diff_as_object(a, b) | |
File.open(file, "w+") { |f| f.write diff } | |
system "mate", file | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment