public
Fork of floehopper/mocha
Description: Mocha is a mocking & stubbing library for Ruby
Homepage: http://mocha.rubyforge.org/
Clone URL: git://github.com/sprsquish/mocha.git
add support for minitest
sprsquish (author)
Sun Nov 16 10:42:39 -0800 2008
commit  5b0e73f70aefb1dab4aa955f87dac1e5b8d1a2b8
tree    0a9b5bb34f8c7043a98adf61c9b2d9cc93301544
parent  28502984e3db83e0dd8a17dd97170b9821d270ba
...
1
2
3
4
5
6
7
 
 
 
 
 
 
 
 
 
 
8
9
 
 
 
10
11
12
13
14
15
 
 
 
 
 
 
16
17
18
19
20
21
...
1
 
2
3
 
 
 
4
5
6
7
8
9
10
11
12
13
14
 
15
16
17
18
 
 
 
 
 
19
20
21
22
23
24
25
 
26
 
27
28
0
@@ -1,20 +1,27 @@
0
 require 'mocha_standalone'
0
-require 'mocha/test_case_adapter'
0
 require 'mocha/configuration'
0
 
0
-require 'test/unit/testcase'
0
-
0
-module Test
0
+if defined? MiniTest
0
+  require 'mocha/mini_test_adapter'
0
+  module MiniTest
0
+    class Unit
0
+      class TestCase
0
+        include Mocha::Standalone
0
+        include Mocha::MiniTestCaseAdapter
0
+      end
0
+    end
0
+  end
0
 
0
-  module Unit
0
+else
0
+  require 'mocha/test_case_adapter'
0
+  require 'test/unit/testcase'
0
 
0
-    class TestCase
0
-  
0
-      include Mocha::Standalone
0
-      include Mocha::TestCaseAdapter
0
-      
0
+  module Test
0
+    module Unit
0
+      class TestCase
0
+        include Mocha::Standalone
0
+        include Mocha::TestCaseAdapter
0
+      end
0
     end
0
-
0
   end
0
-
0
 end
0
\ No newline at end of file

Comments