Sha256: 172cae025495bc4e43e09a3b3925508ae677c85a4ca5e3546336761034dcf199
Contents?: true
Size: 963 Bytes
Versions: 4
Compression:
Stored size: 963 Bytes
Contents
require 'spec_helper' module Enki describe "/posts/index.atom.builder" 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, :edited_at => 1.year.ago, :slug => 'a-post', :approved_comments => [mock_model(Comment)], :tags => [mock_tag] ) assign :posts, [mock_post, mock_post] end it "should render list of posts" do render :template => "/enki/posts/index", :formats => [:atom], :handler => [:builder] end it "should render list of posts with a tag" do assigns[:tag] = 'code' render :template => "/enki/posts/index", :formats => [:atom], :handler => [:builder] end end end
Version data entries
4 entries across 4 versions & 1 rubygems