public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
added test plugin dependency call to use_test

Modifies Kernel#use_test to include a dependency for the test library
specified by the use_test parameter.  Supported test plugins are
merb_rspec and merb_test_unit.

Signed-off-by: Michael D. Ivey <ivey@gweezlebur.com>
benburkert (author)
Tue Feb 12 20:43:18 -0800 2008
ivey (committer)
Wed Feb 13 20:33:01 -0800 2008
commit  7f76614569ea94348364384ac02db4c3dba2709d
tree    65ff946b7fdfd0d447e6b1eba98e66a92feff0f6
parent  f32b4cbf96c307cf913102b676fb379c847daa80
...
89
90
91
92
 
93
94
95
...
101
102
103
 
 
 
104
105
106
...
89
90
91
 
92
93
94
95
...
101
102
103
104
105
106
107
108
109
0
@@ -89,7 +89,7 @@ module Kernel
0
   
0
   # Used in Merb.root/config/init.rb
0
   # Tells merb which testing framework to use.
0
- # Currently merb supports rspec and test_unit for testing
0
+ # Currently merb has plugins to supports RSpec and Test::Unit.
0
   #
0
   # Example
0
   # $ sudo gem install rspec
0
@@ -101,6 +101,9 @@ module Kernel
0
     Merb.generator_scope.delete(:rspec)
0
     Merb.generator_scope.delete(:test_unit)
0
     Merb.generator_scope.push(test_framework.to_sym)
0
+
0
+ test_plugin = test_framework.to_s.match(/^merb_/) ? test_framework.to_s : "merb_#{test_framework}"
0
+ Kernel.dependency(test_plugin)
0
   end
0
   
0
   # Returns an array with a stack trace of the application's files.
...
50
51
52
53
 
 
54
55
56
...
50
51
52
 
53
54
55
56
57
0
@@ -50,7 +50,8 @@ end
0
 
0
 describe "Plugins","use_test" do
0
   before(:each) do
0
- Merb.generator_scope.replace [:merb_default, :merb, :rspec]
0
+ Merb.generator_scope.replace [:merb_default, :merb, :rspec]
0
+ Kernel.stub!(:dependency)
0
   end
0
   
0
   it "should have :rspec in GENERATOR_SCOPE by default" do

Comments

    No one has commented yet.