1 require File.join(File.dirname(__FILE__), "..", "..", 'spec_helper.rb')
3 describe "controller/index" do
6 @store = Store.new(fake_request)
7 #@controller.instance_variable_set(:@posts, [Post.new(:id => 1, :body => "Merb!")])
8 @body = @store.render(:index)
11 it "should have something" do
12 #@body.should have_tag(:div, :class => :posts).with_tag(:div, :class => :post)
15 it "should wrap the body paragraph in a div with class 'post' and the post's id" do
16 #@body.should have_tag(:div, :class => :post, :id => @post.id).with_tag(:p, :class => :body)
19 it "should render the body body within a post div" do
20 #@body.should have_tag(:div,:id => @post.id).with_tag(:p) {|p| p.should contain(@post.body)}