Permalink
Browse files

Add extra regression spec around #post_path.

  • Loading branch information...
1 parent a007758 commit 4c56c1fe8fe785af49f03e0140ee1464cde918fa @xaviershay committed Feb 18, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 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.