Sha256: 6cced530e6888d1060074aec847058cc0cdb661ca10b4327a5b1753eee774207
Contents?: true
Size: 940 Bytes
Versions: 4
Compression:
Stored size: 940 Bytes
Contents
require 'spec_helper' module Enki describe "/posts/index.html" do before(:each) do view.stub!(:enki_config).and_return(Enki::Config.default) mock_tag = mock_model(Tag, :name => 'code' ) mock_post = mock_model(Post, :title => "A post", :body_html => "Posts contents!", :published_at => 1.year.ago, :slug => 'a-post', :approved_comments => [mock_model(Comment)], :tags => [mock_tag] ) assign :posts, [mock_post, mock_post] end after(:each) do rendered.should be_valid_html5_fragment end it "should render list of posts" do render :template => "/enki/posts/index", :formats => [:html] end it "should render list of posts with a tag" do assigns[:tag] = 'code' render :template => "/enki/posts/index", :formats => [:html] end end end
Version data entries
4 entries across 4 versions & 1 rubygems