Skip to content

Commit

Permalink
Merge pull request #701 from kmuto/test-unit
Browse files Browse the repository at this point in the history
test-unit: 	show diff when string-size is huge (<10000)
  • Loading branch information
takahashim authored Dec 26, 2016
2 parents 5446189 + 3a1bf33 commit 4f744a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ rescue LoadError
end

require 'rubygems'
require 'rake/testtask'
require 'rake/clean'

task :default => [:test, :rubocop]
Expand All @@ -20,11 +19,8 @@ task :rubocop do
end
end

Rake::TestTask.new("test") do |t|
t.libs << "test"
t.test_files = Dir.glob("test/**/test_*.rb")
t.verbose = true
t.warning = false
task :test do
ruby("test/run_test.rb")
end

begin
Expand Down
10 changes: 10 additions & 0 deletions test/run_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
lib_dir = File.join(base_dir, "lib")
test_dir = File.join(base_dir, "test")

$LOAD_PATH.unshift(lib_dir)

require 'test/unit'

argv = ["--max-diff-target-string-size=10000"]
exit Test::Unit::AutoRunner.run(true, test_dir, argv)

0 comments on commit 4f744a6

Please sign in to comment.