Sha256: 06b58bfb01d60c18be5f7070f36f07e9b3da9cff4bc49fcb8a632f960060c273
Contents?: true
Size: 1.37 KB
Versions: 4
Compression:
Stored size: 1.37 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' module Enki describe "/posts/show.html" do include UrlHelper before(:each) do view.stub!(:enki_config).and_return(Enki::Config.default) mock_tag = mock_model(Tag, :name => 'code' ) mock_comment = mock_model(Comment, :created_at => 1.month.ago, :author => "Don Alias", :author_url => "http://enkiblog.com", :author_openid_authority => "http://enkiblog.com/server", :body_html => "A comment" ) mock_comment2 = mock_model(Comment, :created_at => 1.month.ago, :author => "Don Alias", :author_url => '', :body_html => "A comment" ) @post = mock_model(Post, :title => "A post", :body_html => "Posts contents!", :published_at => 1.year.ago, :slug => 'a-post', :approved_comments => [mock_comment, mock_comment2], :tags => [mock_tag] ) assign :post, @post assign :comment, Comment.new end after(:each) do rendered.should be_valid_html5_fragment end it "should render a post" do render :template => "/enki/posts/show", :formats => [:html] end end end
Version data entries
4 entries across 4 versions & 1 rubygems