public
Fork of vigetlabs/crash_cart
Description: Tools to manage ExpressionEngine ... maybe.
Clone URL: git://github.com/reagent/crash_cart.git
Search Repo:
Change logic for creating template files
reagent (author)
Tue May 13 18:48:13 -0700 2008
commit  0b531f46d2737cd019584988ae279916f0bd05e0
tree    e1418ea86eaa37b71f05061a7df32bbba577ad1d
parent  54a3515aadffd0867e1dcff90e84b6f7b9509ae4
...
39
40
41
42
 
43
44
45
...
39
40
41
 
42
43
44
45
0
@@ -39,7 +39,7 @@ module ExpressionEngine
0
       
0
       private
0
       def retrieve_file
0
- path = ::ExpressionEngine::Configuration.path
0
+ path = self.preferences[:tmpl_file_basepath]
0
         @file = ::ExpressionEngine::Files::Template.new(path, self)
0
       end
0
       
...
5
6
7
8
 
9
10
11
 
12
13
 
 
14
15
16
...
5
6
7
 
8
9
 
 
10
11
12
13
14
15
16
17
0
@@ -5,12 +5,13 @@ module ExpressionEngine::Models
0
   describe Template do
0
     
0
     it "should have an associated file" do
0
- path = '/path/to/ee/root'
0
+ path = '/path/to/ee/root/templates'
0
       template_file = mock()
0
-
0
- ExpressionEngine::Configuration.expects(:path).returns(path)
0
+
0
       ExpressionEngine::Files::Template.expects(:new).with(path, kind_of(Template)).returns(template_file)
0
       
0
+ Template.any_instance.expects(:preferences).with(nil).returns({:tmpl_file_basepath => path})
0
+
0
       t = Template.find(1)
0
       t.file.should == template_file
0
     end

Comments

    No one has commented yet.