Permalink
Browse files

Use MiniTest.

  • Loading branch information...
dark-panda committed Feb 28, 2013
1 parent 186ffdd commit 839581d8d79a0d1f3270a5b8d99269c749161abf
Showing with 28 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +14 −0 Gemfile
  3. +1 −1 test/ciphers_test.rb
  4. +1 −1 test/digests_test.rb
  5. +1 −1 test/hmacs_test.rb
  6. +10 −1 test/test_helper.rb
View
@@ -7,3 +7,4 @@ doc
.DS_Store
*tmp*
pkg/
+Gemfile.lock
View
14 Gemfile
@@ -0,0 +1,14 @@
+source 'https://rubygems.org'
+
+gemspec
+
+gem "rdoc", "~> 3.12"
+gem "rake", "~> 10.0"
+gem "minitest"
+gem "minitest-reporters"
+gem "guard-minitest"
+
+if File.exists?('Gemfile.local')
+ instance_eval File.read('Gemfile.local')
+end
+
View
@@ -2,7 +2,7 @@
$: << File.dirname(__FILE__)
require 'test_helper'
-class CiphersTest < Test::Unit::TestCase
+class CiphersTest < MiniTest::Unit::TestCase
include TestHelper
Dir.glob('test/data/ciphers/*.dat').sort.each do |f|
View
@@ -2,7 +2,7 @@
$: << File.dirname(__FILE__)
require 'test_helper'
-class DigestsTest < Test::Unit::TestCase
+class DigestsTest < MiniTest::Unit::TestCase
include TestHelper
Dir.glob('test/data/digests/*.dat').sort.each do |f|
View
@@ -2,7 +2,7 @@
$: << File.dirname(__FILE__)
require 'test_helper'
-class HMACsTest < Test::Unit::TestCase
+class HMACsTest < MiniTest::Unit::TestCase
include TestHelper
Dir.glob('test/data/hmacs/*.dat').sort.each do |f|
View
@@ -1,8 +1,12 @@
require 'rubygems'
-require 'test/unit'
+require 'minitest/autorun'
+require 'minitest/reporters' if RUBY_VERSION >= '1.9'
require File.join(File.dirname(__FILE__), %w{ .. ext cryptopp })
+puts "Version #{CryptoPP::VERSION}"
+puts "Crypto++ version #{CryptoPP::CRYPTOPP_VERSION}"
+
module TestHelper
def readfile(file)
File.open(file) do |f|
@@ -41,3 +45,8 @@ def readfile(file)
end
end
end
+
+if RUBY_VERSION >= '1.9'
+ MiniTest::Reporters.use!(MiniTest::Reporters::SpecReporter.new)
+end
+

0 comments on commit 839581d

Please sign in to comment.