mhennemeyer-matchy 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/matchy.rb +3 -1
- data/matchy.gemspec +1 -1
- metadata +1 -1
data/lib/matchy.rb
CHANGED
@@ -11,11 +11,13 @@ module Matchy
|
|
11
11
|
# Rails for example defines MiniTest, so only check for
|
12
12
|
# defined?(MiniTest) would be malicious
|
13
13
|
defined?(MiniTest) && defined?(MiniTest::Assertions) &&
|
14
|
-
(!defined?(Test::Unit::TestCase) ||
|
14
|
+
(!defined?(Test::Unit::TestCase) || (Test::Unit::TestCase < MiniTest::Assertions))
|
15
15
|
end
|
16
|
+
|
16
17
|
def self.assertions_module
|
17
18
|
minitest? ? MiniTest::Assertions : Test::Unit::Assertions
|
18
19
|
end
|
20
|
+
|
19
21
|
def self.test_case_class
|
20
22
|
minitest? ? MiniTest::Unit::TestCase : Test::Unit::TestCase
|
21
23
|
end
|
data/matchy.gemspec
CHANGED