Permalink
Browse files

use markdown filenames

  • Loading branch information...
1 parent 9152754 commit d7f3c6872428bfcc263608cafb4d5869772a5510 @bdimcheff committed Jan 16, 2009
Showing with 9 additions and 5 deletions.
  1. +5 −1 config.ru
  2. +4 −4 spec/glug_spec.rb
View
6 config.ru
@@ -1,3 +1,7 @@
+require 'rubygems'
+require 'sinatra/base'
require 'glug'
-run Glug
+Glug.set :repo, File.expand_path(File.dirname(__FILE__))
+
+run Glug.new
View
8 spec/glug_spec.rb
@@ -33,9 +33,9 @@
describe '.locate' do
it 'returns files out of [repo]/pages' do
- flexmock(Page, 'repo.path' => '/path/to/repo/.git')
+ flexmock(Page, :repo => '/path/to/repo/')
- Page.send(:locate, 'testpage').should == '/path/to/repo/pages/testpage'
+ Page.send(:locate, 'testpage').should == '/path/to/repo/pages/testpage.md'
end
end
@@ -114,9 +114,9 @@
describe 'Post' do
describe '.locate' do
it 'returns files out of [repo]/posts/YYYY/MM/DD/slug' do
- flexmock(Page, 'repo.path' => '/path/to/repo/.git')
+ flexmock(Page, :repo => '/path/to/repo/')
- Post.send(:locate, '2008', '01', '01', 'testpost').should == '/path/to/repo/posts/2008/01/01/testpost'
+ Post.send(:locate, '2008', '01', '01', 'testpost').should == '/path/to/repo/posts/2008/01/01/testpost.md'
end
end
end

0 comments on commit d7f3c68

Please sign in to comment.