Skip to content
This repository
Browse code

Add extra regression spec around #post_path.

  • Loading branch information...
commit 4c56c1fe8fe785af49f03e0140ee1464cde918fa 1 parent a007758
Xavier Shay authored

Showing 1 changed file with 15 additions and 0 deletions. Show diff stats Hide diff stats

  1. +15 0 spec/helpers/url_helper_spec.rb
15 spec/helpers/url_helper_spec.rb
... ... @@ -0,0 +1,15 @@
  1 +require 'spec_helper'
  2 +
  3 +describe UrlHelper do
  4 + include UrlHelper
  5 +
  6 + describe '#post_path' do
  7 + it 'should prefix slug with published_at' do
  8 + post = stub(
  9 + :published_at => Date.new(2012,1,1),
  10 + :slug => 'post'
  11 + )
  12 + post_path(post).should == '/2012/01/01/post'
  13 + end
  14 + end
  15 +end

0 comments on commit 4c56c1f

Please sign in to comment.
Something went wrong with that request. Please try again.