Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use markdown filenames

  • Loading branch information...
commit d7f3c6872428bfcc263608cafb4d5869772a5510 1 parent 9152754
@bdimcheff authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.