GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: A lightweight and flexible website management system.
Homepage: http://webby.rubyforge.org/
Clone URL: git://github.com/TwP/webby.git
Updating tests to use the new test data directory structure.
Tim Pease (author)
Thu Sep 18 20:16:36 -0700 2008
commit  dc14fc05ca9520819b0af3edc6d5cdfb8608f21d
tree    d1f197ce33ae1b06214ba4af58ce62d49f9d6272
parent  f853a380bb162e703987a4387aca8507cd12f327
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@ describe Webby::Resources::DB do
0
 
0
   before :each do
0
     layout = Webby::Resources::Layout.
0
- new(Webby.datapath %w[layouts tumblog default.txt])
0
+ new(Webby.datapath %w[site layouts tumblog default.txt])
0
     Webby::Resources.stub!(:find_layout).and_return(layout)
0
 
0
     @db = Webby::Resources::DB.new
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ require File.expand_path(
0
 describe Webby::Resources::Layout do
0
   before :each do
0
     layout = Webby::Resources::Layout.
0
- new(Webby.datapath %w[layouts tumblog default.txt])
0
+ new(Webby.datapath %w[site layouts tumblog default.txt])
0
     Webby::Resources.stub!(:find_layout).and_return(layout)
0
 
0
     @default = File.join %w[layouts tumblog default.txt]
...
11
12
13
14
 
15
16
17
18
19
20
 
21
22
23
24
25
26
 
27
28
29
...
31
32
33
34
 
35
36
37
38
39
40
 
41
42
43
...
47
48
49
50
 
51
52
53
...
65
66
67
68
 
69
70
71
...
105
106
107
108
 
109
110
111
112
113
 
114
115
116
...
118
119
120
121
 
122
123
124
...
132
133
134
135
 
136
137
138
139
140
 
141
142
143
...
145
146
147
148
 
149
150
151
152
153
 
154
155
156
...
158
159
160
161
 
162
163
164
...
11
12
13
 
14
15
16
17
18
19
 
20
21
22
23
24
25
 
26
27
28
29
...
31
32
33
 
34
35
36
37
38
39
 
40
41
42
43
...
47
48
49
 
50
51
52
53
...
65
66
67
 
68
69
70
71
...
105
106
107
 
108
109
110
111
112
 
113
114
115
116
...
118
119
120
 
121
122
123
124
...
132
133
134
 
135
136
137
138
139
 
140
141
142
143
...
145
146
147
 
148
149
150
151
152
 
153
154
155
156
...
158
159
160
 
161
162
163
164
0
@@ -11,19 +11,19 @@ describe Webby::Resources::MetaFile do
0
   end
0
 
0
   it 'returns the number of meta-data blocks at the top of a file' do
0
- fn = Webby.datapath %w[content css coderay.css]
0
+ fn = Webby.datapath %w[site content css coderay.css]
0
     File.open(fn, 'r') do |fd|
0
       mf = Webby::Resources::MetaFile.new(fd)
0
       mf.meta_count.should == 0
0
     end
0
 
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
     File.open(fn, 'r') do |fd|
0
       mf = Webby::Resources::MetaFile.new(fd)
0
       mf.meta_count.should == 1
0
     end
0
 
0
- fn = Webby.datapath %w[content photos.txt]
0
+ fn = Webby.datapath %w[site content photos.txt]
0
     File.open(fn, 'r') do |fd|
0
       mf = Webby::Resources::MetaFile.new(fd)
0
       mf.meta_count.should == 3
0
@@ -31,13 +31,13 @@ describe Webby::Resources::MetaFile do
0
   end
0
 
0
   it 'determines the end of the final meta-data block' do
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
     File.open(fn, 'r') do |fd|
0
       mf = Webby::Resources::MetaFile.new(fd)
0
       mf.meta_end.should == 7
0
     end
0
 
0
- fn = Webby.datapath %w[content photos.txt]
0
+ fn = Webby.datapath %w[site content photos.txt]
0
     File.open(fn, 'r') do |fd|
0
       mf = Webby::Resources::MetaFile.new(fd)
0
       mf.meta_end.should == 18
0
@@ -47,7 +47,7 @@ describe Webby::Resources::MetaFile do
0
   # -----------------------------------------------------------------------
0
   describe '.each' do
0
     it 'yields each meta-data block' do
0
- fn = Webby.datapath %w[content photos.txt]
0
+ fn = Webby.datapath %w[site content photos.txt]
0
       output = []
0
       File.open(fn, 'r') do |fd|
0
         mf = Webby::Resources::MetaFile.new(fd)
0
@@ -65,7 +65,7 @@ describe Webby::Resources::MetaFile do
0
     end
0
 
0
     it 'yields a single meta-data block' do
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
       output = []
0
       File.open(fn, 'r') do |fd|
0
         mf = Webby::Resources::MetaFile.new(fd)
0
@@ -105,12 +105,12 @@ describe Webby::Resources::MetaFile do
0
   # -----------------------------------------------------------------------
0
   describe '#meta_data' do
0
     it 'returns nil for regular files' do
0
- fn = Webby.datapath %w[content css coderay.css]
0
+ fn = Webby.datapath %w[site content css coderay.css]
0
       Webby::Resources::MetaFile.meta_data(fn).should be_nil
0
     end
0
 
0
     it 'returns a hash for pages' do
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
       h = Webby::Resources::MetaFile.meta_data(fn)
0
 
0
       h.should be_instance_of(Hash)
0
@@ -118,7 +118,7 @@ describe Webby::Resources::MetaFile do
0
     end
0
 
0
     it 'returns a hash for layouts' do
0
- fn = Webby.datapath %w[layouts default.txt]
0
+ fn = Webby.datapath %w[site layouts default.txt]
0
       h = Webby::Resources::MetaFile.meta_data(fn)
0
 
0
       h.should be_instance_of(Hash)
0
@@ -132,12 +132,12 @@ describe Webby::Resources::MetaFile do
0
   # -----------------------------------------------------------------------
0
   describe "#meta_data?" do
0
     it 'returns true for files with meta-data' do
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
       Webby::Resources::MetaFile.meta_data?(fn).should == true
0
     end
0
 
0
     it 'returns false for files without meta-data' do
0
- fn = Webby.datapath %w[content css coderay.css]
0
+ fn = Webby.datapath %w[site content css coderay.css]
0
       Webby::Resources::MetaFile.meta_data?(fn).should == false
0
     end
0
   end
0
@@ -145,12 +145,12 @@ describe Webby::Resources::MetaFile do
0
   # -----------------------------------------------------------------------
0
   describe "#read" do
0
     it 'behaves the same as File#read for regular files' do
0
- fn = Webby.datapath %w[content css coderay.css]
0
+ fn = Webby.datapath %w[site content css coderay.css]
0
       Webby::Resources::MetaFile.read(fn).should == ::File.read(fn)
0
     end
0
 
0
     it 'returns only the content for pages' do
0
- fn = Webby.datapath %w[content index.txt]
0
+ fn = Webby.datapath %w[site content index.txt]
0
       lines = File.readlines(fn)
0
       lines = lines[7..-1].join
0
 
0
@@ -158,7 +158,7 @@ describe Webby::Resources::MetaFile do
0
     end
0
 
0
     it 'returns only the content for layouts' do
0
- fn = Webby.datapath %w[layouts default.txt]
0
+ fn = Webby.datapath %w[site layouts default.txt]
0
       lines = File.readlines(fn)
0
       lines = lines[4..-1].join
0
 
...
6
7
8
9
 
10
11
12
...
6
7
8
 
9
10
11
12
0
@@ -6,7 +6,7 @@ require File.expand_path(
0
 describe Webby::Resources::Page do
0
   before :each do
0
     layout = Webby::Resources::Layout.
0
- new(Webby.datapath %w[layouts default.txt])
0
+ new(Webby.datapath %w[site layouts default.txt])
0
     Webby::Resources.stub!(:find_layout).and_return(layout)
0
 
0
     @filename = File.join %w[content index.txt]
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@ describe Webby::Resources::Resource do
0
 
0
   before :each do
0
     layout = Webby::Resources::Layout.
0
- new(Webby.datapath %w[layouts default.txt])
0
+ new(Webby.datapath %w[site layouts default.txt])
0
     Webby::Resources.stub!(:find_layout).and_return(layout)
0
 
0
     @filename = File.join %w[content index.txt]
...
47
48
49
50
 
51
52
53
...
47
48
49
 
50
51
52
53
0
@@ -47,7 +47,7 @@ describe Webby::Resources do
0
   describe "#new" do
0
     before :each do
0
       layout = Webby::Resources::Layout.
0
- new(Webby.datapath %w[layouts default.txt])
0
+ new(Webby.datapath %w[site layouts default.txt])
0
       Webby::Resources.stub!(:find_layout).and_return(layout)
0
     end
0
 

Comments

    No one has commented yet.