Sha256: b8f002851b149e4bc74c96e2a201f29f5939889a0f83235c7e284fe1b3f6677f

Contents?: true

Size: 686 Bytes

Versions: 2

Compression:

Stored size: 686 Bytes

Contents

require 'runit/testcase'
require 'runit/cui/testrunner'
require 'runit/testsuite'
require 'diff'
require 'emaildiff'
require 'test_emailcases'

class EmailDiffTest < RUNIT::TestCase

  include EmailDiffArrayTests
  def emailtest(a, b, c, d = :tokens)
    #puts "old string:"
    #puts a
    #puts "new string:"
    #puts b
    diff = EmailDiff.new(a, b)
    #puts "old stripped:"
    #puts diff.strip_a
    #puts "new stripped:"
    #puts diff.strip_b
    if d == :tokens 
      result = a.patch_email(diff,888,999)
    else
      result = a.patch_email(diff)
    end
    #puts "result:"
    #puts d
    assert_equal(c,result)
  end
end

RUNIT::CUI::TestRunner.run(EmailDiffTest.suite)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
diff-0.3.6 test/test_emaildiff.rb
diff-0.3.5 test/test_emaildiff.rb