Closed sshaw closed 10 years ago
Oh, almost forgot about the Minitest business. Basically I scrapped that idea, as it proved to be too problematic. Minitest really wants one to use minitest/autorun
which sets up an invasive at_exit
handler. That aside, you have to do the follow to make it "work" which, under v2.1.3
, produces an irrelevant and confusing warning:
# test-minitest.rb
if RUBY_VERSION == "2.1.2"
module Minitest end
require "minitest"
end
require 'minitest/unit'
puts MiniTest::Assertions.respond_to?(:diff) ?
MiniTest::Assertions.diff :
"No .diff"
~/code/ruby/diffy >rvm 1.9.2,1.9.3,2.1.2,2.1.3 do ruby -v ../test-minitest.rb
ruby 1.9.2p330 (2014-08-07 revision 47094) [x86_64-darwin13.0.2]
No .diff
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.0.2]
diff -u
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
diff -u
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
../test-minitest.rb:6:in `<main>'
diff -u
Looks good. Thanks for the contribution!
I'll try to get a new version of the gem pushed out in the next few days.
This is released in version 3.0.7. http://rubygems.org/gems/diffy
This is RE: #47 and #48. I can add specs, but this will require removing
@@bin
or some other hackery.Added
DIFFY_DIFF
environment variable based on your comment.Updated the README but not sure what you mean here by "these two".