public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
mack-active_record no longer uses functional and unit test directories. [#73 
state:resolved]
markbates (author)
Mon Aug 04 12:16:47 -0700 2008
commit  3b331aaa95e797c390d8bd41422ee4cb3dced130
tree    5485a0872ab92f9c0000e0b0cb800e97368baeaf
parent  e76cbe792ed499a42fce906de3ad7638c2d307d8
...
10
11
12
13
 
14
15
16
17
18
 
19
20
...
10
11
12
 
13
14
15
16
17
 
18
19
20
0
@@ -10,10 +10,10 @@ model_template:
0
 test_template:
0
   type: file
0
   template_path: <%= File.join(templates_directory_path, "test.rb.template") %>
0
-  output_path: <%= File.join("test", "unit", "#{param(:name).singular.underscore}_test.rb") %>
0
+  output_path: <%= File.join("test", "models", "#{param(:name).singular.underscore}_test.rb") %>
0
 <% elsif testing_framework == "rspec" %>
0
 test_template:
0
   type: file
0
   template_path: <%= File.join(templates_directory_path, "rspec.rb.template") %>
0
-  output_path: <%= File.join("test", "unit", "#{param(:name).singular.underscore}_spec.rb") %>
0
+  output_path: <%= File.join("test", "models", "#{param(:name).singular.underscore}_spec.rb") %>
0
 <% end %>
0
\ No newline at end of file
...
22
23
24
25
 
26
27
28
29
30
 
31
32
...
22
23
24
 
25
26
27
28
29
 
30
31
32
0
@@ -22,10 +22,10 @@ show_template:
0
 functional_test_template:
0
   type: file
0
   template_path: <%= File.join(templates_directory_path, "test.rb.template") %>
0
-  output_path: <%= File.join("test", "functional", "#{@name_plural}_controller_test.rb") %>
0
+  output_path: <%= File.join("test", "controllers", "#{@name_plural}_controller_test.rb") %>
0
 <% elsif @test_framework == "rspec" -%>
0
 functional_test_template:
0
   type: file
0
   template_path: <%= File.join(templates_directory_path, "spec.rb.template") %>
0
-  output_path: <%= File.join("test", "functional", "#{@name_plural}_controller_spec.rb") %>
0
+  output_path: <%= File.join("test", "controllers", "#{@name_plural}_controller_spec.rb") %>
0
 <% end -%>
0
\ No newline at end of file
...
6
7
8
9
 
10
11
12
...
36
37
38
39
 
40
41
42
...
6
7
8
 
9
10
11
12
...
36
37
38
 
39
40
41
42
0
@@ -6,7 +6,7 @@ describe ModelGenerator do
0
   before(:each) do 
0
     @model_file = File.join(Mack.root, "app", "models", "zoo.rb")
0
     @mig_file   = File.join(Mack.root, "db", "migrations", "002_create_zoos.rb")
0
-    @test_file  = File.join(Mack.root, "test", "unit", "zoo_test.rb")
0
+    @test_file  = File.join(Mack.root, "test", "models", "zoo_test.rb")
0
   end
0
   
0
   after(:each) do
0
@@ -36,7 +36,7 @@ describe ModelGenerator do
0
   
0
   it "should create a stub rspec test for the model if rspec is testing framework" do
0
     temp_app_config("mack::testing_framework" => "rspec") do
0
-      @test_file = File.join(Mack.root, "test", "unit", "zoo_spec.rb")
0
+      @test_file = File.join(Mack.root, "test", "models", "zoo_spec.rb")
0
       ModelGenerator.run("NAME" => "zoo")
0
       File.exists?(@test_file).should == true
0
     end
...
15
16
17
18
19
 
 
20
21
22
...
66
67
68
69
70
 
 
71
72
73
...
15
16
17
 
 
18
19
20
21
22
...
66
67
68
 
 
69
70
71
72
73
0
@@ -15,8 +15,8 @@ describe ScaffoldGenerator do
0
     @model_file = File.join(@model_path, "zoo.rb")
0
     
0
     @mig_file = File.join(migrations_directory, "#{next_migration_number}_create_zoos.rb")
0
-    @cont_test_file = File.join(Mack.root, "test", "functional", "zoos_controller_test.rb")
0
-    @model_test_file = File.join(Mack.root, "test", "unit", "zoo_test.rb")
0
+    @cont_test_file = File.join(Mack.root, "test", "controllers", "zoos_controller_test.rb")
0
+    @model_test_file = File.join(Mack.root, "test", "models", "zoo_test.rb")
0
     
0
     @routes_file = File.join(Mack.root, "config", "routes.rb")
0
     @orig_routes_content = File.read(@routes_file)
0
@@ -66,8 +66,8 @@ describe ScaffoldGenerator do
0
   it "should create a stub rspec test for the controller if rspec is testing framework" do
0
     temp_app_config("mack::testing_framework" => "rspec") do
0
       ScaffoldGenerator.run("NAME" => "zoo")
0
-      @cont_test_file = File.join(Mack.root, "test", "functional", "zoos_controller_spec.rb")
0
-      @model_test_file = File.join(Mack.root, "test", "unit", "zoo_spec.rb")
0
+      @cont_test_file = File.join(Mack.root, "test", "controllers", "zoos_controller_spec.rb")
0
+      @model_test_file = File.join(Mack.root, "test", "models", "zoo_spec.rb")
0
       File.exists?(@cont_test_file).should == true    
0
     end
0
   end

Comments