Skip to content

Commit

Permalink
Add extra regression spec around #post_path.
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviershay committed Feb 18, 2012
1 parent a007758 commit 4c56c1f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/helpers/url_helper_spec.rb
@@ -0,0 +1,15 @@
require 'spec_helper'

describe UrlHelper do
include UrlHelper

describe '#post_path' do
it 'should prefix slug with published_at' do
post = stub(
:published_at => Date.new(2012,1,1),
:slug => 'post'
)
post_path(post).should == '/2012/01/01/post'
end
end
end

0 comments on commit 4c56c1f

Please sign in to comment.